|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-10-30 14:37 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 21:00:01 2025 UTC |
Description: ------------ RUN this and see the output .... prety serious BUG i think Reproduce code: --------------- <? $lines[0]="a;1"; $lines[1]="b;1"; $lines[2]="c;1"; $lines[3]="d;1"; print_r($lines); foreach ($lines as $line_num => &$line) { $cell = explode(";", $line); $cell[1] = str_replace('1', '2', $cell[1]); $line = implode (";", $cell); } print_r($lines); echo ("<br/>"); foreach ($lines as $line_num => $line) { echo $line_num." = ".$line."<hr>"; } ?> Expected result: ---------------- last line shloud be last line ... Actual result: -------------- last line is taken from line before previous line