Jochem Maas wrote:
Paul,

the warning that John refers to does occur - whether you see it depends on the error reporting level, PHP will create the array for you if you have not already initialized it but a warning will be generated in such cases. ...

error_reporting = E_ALL

...

display_errors = On


...

as a rule of thumb it is better to initialize variable before you use them.


e.g. $pictures = array();

otherwise, in your case, if no files are present in the directory (or none have a 'jpg' extension) referencing the $pictures array the while loop will cause another error.


Thanks for the advice. I do think the manual is pretty good and I'll spend more time with it. But... I do have error reporting set to all. I think they may have changed the behavior on newer versions of PHP. I have indeed experienced the non-existant array eerror you describe. Lots of debugging to do!

PS here's my results from a voracious weekend of coding:
<http://hills.ccsf.edu/~pfurma02/index.php?SCREEN=ecards.php>
Thanks for all your help!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to