note 9262 deleted from echo by jmcastagnetto

From: Date: Thu, 26 Oct 2000 00:36:37 +0000
Subject: note 9262 deleted from echo by jmcastagnetto
Groups: php.notes 
Request: Send a blank email to php-notes+get-6983@lists.php.net to get a copy of this message
Hello, Don't waste time like me on this: <font face=Arial size=2> &lt;?php $Str_Year = 2000; echo "year= "; echo $Str_Year; echo ", year+1 is "; echo $Str_Year+1; /* HTML Output: year is 2000 year+1 is 2001 Output ok */ echo "<br> year= ".$Str_Year.", year+1 = ". $Str_Year+1; /* HTML Output: 1 Output bad */ echo "<br> year= ".$Str_Year.", year+1 = ". ($Str_Year+1); /* HTML Output: year= 2000, year+1 = 2001 Output Ok */ ?> <br> Why that 1? $foo = "10.0 pigs " + 1; // $foo is integer (11) ... Take care!

« previous php.notes (#6983) next »