|  | Posted by Rik Wasmus on 10/26/07 11:01 
On Fri, 26 Oct 2007 12:47:44 +0200, Captain Paralytic  =
 <paul_lautman@yahoo.com> wrote:
 
 > On 26 Oct, 10:55, "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote:
 >> On Fri, 26 Oct 2007 10:47:45 +0200, Xav <xav...@inbox.com> wrote:
 >> > I did the <pre>...</pre> thing...
 >> > it shows;
 >>
 >> > [0] =3D> file1.php
 >> > [1] =3D> file2.php
 >> > etc...
 >>
 >> > as expected!
 >>
 >> > I think I found a Bug!
 >>
 >> Not very likely.
 >> Do this:
 >>
 >> $c =3D count($content);
 >> for( $x=3D0; $x<$c; $x++ ){
 >>     echo "|{$fileDir}{$content[$x]}|\n";
 >>
 >> }
 >>
 >> The pipes are there to discover whitespace, a normal space would acco=
 unt
 >> for the difference. Normally I'd be against using <pre>, just look at=
 =
 
 >> the
 >> source. And please enable error_reporting & display_errors while
 >> developing, and tell us why PHP sais the include fails.
 >
 > Surely {$content[$x]} won't work. PHP does only one substitution so
 > {$content[1]} will work but {$content[$x]} doesn't (at least in my
 > experience).
 
 The code:
 <?php
 echo phpversion();
 $foo =3D array(3 =3D> 'bar');
 $x =3D 3;
 echo "{$foo[$x]}";
 ?>
 Output:
 5.2.4bar
 
 The magic is in the braces.
 -- =
 
 Rik Wasmus
 [Back to original message] |