From:             [EMAIL PROTECTED]
Operating system: Win 98se
PHP version:      4.0.4pl1
PHP Bug Type:     *Function Specific
Bug description:  implode(), if empty elements exist

exploding and imploding a string (seperated by "+"):

  $a = "11+12+13+14+++++++++";
        
  echo ("a befor execution: ".$a."<BR>");
        
  list(
    $r["A"],
    $r["B"],
    $r["C"],
    $r["D"],
    $r["E"],
    $r["F"],
    $r["G"],
    $r["H"],
    $r["I"],
    $r["J"],
    $r["K"],
    $r["L"],
    $r["M"]) = explode("+", $a);

  $a = implode("+", $r);
  echo ("a after execution: ".$a."<BR>");

I expect an output (like PHP 3.0.17):
a befor execution: 11+12+13+14+++++++++
a after execution: 11+12+13+14+++++++++

but the output is (in current version):
a befor execution: 11+12+13+14+++++++++
a after execution: +++++++++14+13+12+11
 
after execution the string is vis versus. It happens only if I try to implode emty 
elements. The behaviour is different to PHP 3.0.X


-- 
Edit Bug report at: http://bugs.php.net/?id=10120&edit=1



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to