Re: [Linux dev] Undefined variables

From: Date: Sat, 09 Sep 2006 11:04:00 +0000
Subject: Re: [Linux dev] Undefined variables
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-27139@lists.php.net to get a copy of this message
Hendrik Visage wrote: > On 9/8/06, Alf Stockton <alf@stockton.co.za> wrote: >> In this little script:- >> >> <?php >> session_start(); >> //read folder >> $folder=opendir("."); >> while ($file = readdir($folder)) >> $names[count($names)] = $file; // <----- Line 8 > > Obviously $names won't be defined in the initial state the first time > this line > is hit, thus count($names) would/should be undefined... > Interesting that this works on versions of Windows PHP previous to 5.1.6 -- Regards, Alf Stockton www.stockton.co.za Big book, big bore. -- Callimachus My email disclaimer is available at www.stockton.co.za/disclaimer.html

« previous php.windows (#27139) next »