Jump to content

Newbie calculation


pedrobcabral

Recommended Posts

Sorry guys but the following code:

[code]
<?php
$numero1 = "01";
$numero2 = "01";

$conta = $numero1 + $numero2;
echo $conta;
?>
[/code]

The variable $conta outputs the number "2". How can I make it to be "02" instead of "2"?
Thank you. (I put the double quote to try to turn this a string, not a number as it is now, but I did not sucededd)
Link to comment
https://forums.phpfreaks.com/topic/22313-newbie-calculation/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.