Re: [PHP] Declaring arrays? Good practice?

2005-12-14 Thread adriano ghezzi
imho I agree always declare all kinds of variables before using in the specific situation you have to consider that you are using two different variables rthe $foo inside the function and the $foo outside the function I think its' correct to declar both, imho you should use different names if

[PHP] Declaring arrays? Good practice?

2005-12-13 Thread Michael Hulse
Sorry if this question sounds noobish: $foo = array(); // Declare first, good practice. $foo = array('one', 'two', 'three'); Using above as example, is it good to always declare the array first? I usually/always declare my arrays first, but sometimes I get a bit confused... for example:

Re: [PHP] Declaring arrays? Good practice?

2005-12-13 Thread Robert Cummings
On Tue, 2005-12-13 at 22:34, Michael Hulse wrote: Sorry if this question sounds noobish: $foo = array(); // Declare first, good practice. The above is a declaration. $foo = array('one', 'two', 'three'); The above is ALSO a declaration. The first declaration is redundant and unnecessary

Re: [PHP] Declaring arrays? Good practice?

2005-12-13 Thread Curt Zirzow
On Tue, Dec 13, 2005 at 07:34:31PM -0800, Michael Hulse wrote: Sorry if this question sounds noobish: $foo = array(); // Declare first, good practice. $foo = array('one', 'two', 'three'); Using above as example, is it good to always declare the array first? Well there really isn't any

Re: [PHP] Declaring arrays? Good practice?

2005-12-13 Thread Michael Hulse
Thanks Curt and Robert! You guys really helped clear things up for me. You guys rock! I really appreciate all of your help. :) Cheers, Micky -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php