ID: 43414
User updated by: cappytoi at yahoo dot com
Reported By: cappytoi at yahoo dot com
Status: Open
Bug Type: Arrays related
Operating System: Windows Xp
PHP Version: 5.2.5
New Comment:
It only shows in firefox, in internet explorer it gives me the result,
but i couldn't understand why when I do not use implode(); it works
normally. The results are same, doesn't it mean that browser execute the
same code?
Previous Comments:
------------------------------------------------------------------------
[2007-11-27 14:00:40] cappytoi at yahoo dot com
I am using apache 2.59, and my Windows Locale is Turkish. But I think
it is not about locale. Because when I test it with the enviroment on
Centos apache 2.59 with php5.2.4 it gives me the same result and the
locale is en_US.
It may be caused by apache sapi. But the problem function is
"implode()". It works normally when I parse the results with "foreach"
------------------------------------------------------------------------
[2007-11-27 13:05:12] [EMAIL PROTECTED]
I tried with CLI:
# src/build/php_5_2/sapi/cli/php t.php
lang[]=turkce&lang[]=english&lang[]=german
And no problems there. In what browser does it give you that? Have you
got some weird locale set on your machine or what?
------------------------------------------------------------------------
[2007-11-26 17:28:20] cappytoi at yahoo dot com
also found that using "times" instead of "lang" causes a similar
result.
------------------------------------------------------------------------
[2007-11-26 17:12:05] cappytoi at yahoo dot com
Description:
------------
Hi,
I have found the following problem. I try to produce a query string and
I found that using lang as a key makes problem with implode.
Reproduce code:
---------------
<?php
$all = array(
'turkce',
'english',
'german'
);
$t = array();
foreach ($all as $al) {
$t[] = 'lang[]='.$al;
}
echo implode('&',$t);
?>
Expected result:
----------------
lang[]=turkce&lang[]=english&lang[]=german
Actual result:
--------------
lang[]=turkce〈[]=english〈[]=german
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43414&edit=1