Foreach is very much better as it does not mean having to traverse the
array to find the given value. If you have a long array, you'll find
looking up a element by index gets slow.
AJ
Stut wrote:
Hendrik Visage wrote:
right>
The rewrite below does not iterate around the array as you were i
Hendrik Visage wrote:
The rewrite below does not iterate around the array as you were in your
for loop, so I'll mention a better way to do that here rather than in
the snippet below... foreach - look it up in the PHP manual!
One way to rewrite it would be like this (with comments hopefully
On 9/8/06, Alf Stockton <[EMAIL PROTECTED]> wrote:
In this little script:-
Obviously $names won't be defined in the initial state the first time this line
is hit, thus count($names) would/should be undefined...
closedir($folder);
//sort file names in array
sort($names);
//remove any non-imag
In this little script:-
";}
?>
I keep getting:-
[Fri Sep 08 17:04:57 2006] [error] [client 127.0.0.1] PHP Notice:
Undefined variable: names in C:\\Program Files\\Apache Software
Foundation\\Apache2.2\\htdocs\\events\\adverts\\ridtoo.php on line 8,
referer: http://localhost/events/rotate.sh
zerof wrote:
Bradley Davidson escreveu:
I have tried to follow the instructions to manually install PHP on
Windows
XP, using IIS and MySQL. I have been unable to test if PHP is installed
because when I try to open a PHP file in a browser (either firefox or
IE6)
it launches Dreamweaver.
What
DevPhp wrote:
Hi,
I've a problem with php and the execution of an external script.
The script is adutil.vbs , belonging to the IIS administration Script on
windows 2000 server.
The vbs have to be execute with Cscript.exe.
When I execute it from Dos shell there's no problems: for examples
c:\C