#20448 [Opn->Bgs]: I can't concat a string with +=
| From: | iliaa@php.net | Date: | Fri, 15 Nov 2002 16:48:10 +0000 |
| Subject: | #20448 [Opn->Bgs]: I can't concat a string with += | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-24992@lists.php.net to get a copy of this message | ||
ID: 20448
Updated by: iliaa@php.net
Reported By: 00664714@academ01.gda.itesm.mx
-Status: Open
+Status: Bogus
Bug Type: Strings related
Operating System: Windows 2000
PHP Version: 4.2.3
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
strings should be concatinated using a '.'
ex: $b .= "a";
Previous Comments:
------------------------------------------------------------------------
[2002-11-15 10:45:31] 00664714@academ01.gda.itesm.mx
Hi! I have the following code:
$a_data = array("a","b","c");
$s_data = "";
foreach($a_data as $data){
$s_data += $data;
}
echo $s_data;
I was trying to make $s_data contain "abc" but instead I get a 0. It
seems that += cube of types returns an int ignoring that the user is
trying to concat an string.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20448&edit=1