Bug #4443: inconsistant parsing

From: Date: Sun, 14 May 2000 18:50:20 +0000
Subject: Bug #4443: inconsistant parsing
Groups: php.dev 
Request: Send a blank email to php-dev+get-18729@lists.php.net to get a copy of this message
From: xdesign@hotmal.com Operating system: rh linux 6.2 PHP version: 3.0.16 PHP Bug Type: Parser error Bug description: inconsistant parsing for($i=0; $i<3; $i++) { if(($row[$i+11] != "") || ($row[$i+19] != "")) { print("<tr><td>"); if($row[$i+11] != "") { $tmp = $i + 11; print("<table width=100%><tr><td>$row[$tmp]</td>"); $tmp = $i + 15; print("<td align=right>($row[$i+11])</td></tr></table>\n"); --- In the sample above, the reference to $row[$tmp] works fine but the more direct $row[$i+11] doesn't and returns a parsing error saying: Parse error: parse error, expecting `']'' in /home/httpd/html/xxx.html on line 47 As you can see, I have devised a work-around to the problem but I cannot easily see that I have made a mistake in it.

« previous php.dev (#18729) next »