|
Posted by Captain Paralytic on 10/26/07 11:11
On 26 Oct, 12:04, Captain Paralytic <paul_laut...@yahoo.com> wrote:
> On 26 Oct, 12:01, "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote:
>
>
>
>
>
> > On Fri, 26 Oct 2007 12:47:44 +0200, Captain Paralytic
>
> > <paul_laut...@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] => file1.php
> > >> > [1] => file2.php
> > >> > etc...
>
> > >> > as expected!
>
> > >> > I think I found a Bug!
>
> > >> Not very likely.
> > >> Do this:
>
> > >> $c = count($content);
> > >> for( $x=0; $x<$c; $x++ ){
> > >> echo "|{$fileDir}{$content[$x]}|\n";
>
> > >> }
>
> > >> The pipes are there to discover whitespace, a normal space would account
> > >> 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 = array(3 => 'bar');
> > $x = 3;
> > echo "{$foo[$x]}";
> > ?>
> > Output:
> > 5.2.4bar
>
> > The magic is in the braces.
> > --
> > Rik Wasmus- Hide quoted text -
>
> > - Show quoted text -
>
> So would
> echo "$foo[$x]";
> not work then?- Hide quoted text -
>
> - Show quoted text -
Hmmm, interesting. Works with or without the braces. Now I'm sure I
had a situation like this where it didn't work...
Navigation:
[Reply to this message]
|