Re: [PHP] Variable name declarations?

2001-07-15 Thread teo
Hi Kent! On Sat, 14 Jul 2001, Kent Sandvik wrote: > > > function sum_array( $input_array ) > > { > > var $index; > > var $sum = 0; > > > > for( $index = 0; $index < count( $input_array ); $index++ ) > > $sum += $input_array[ $index ]; > > > > return $sum; > > } > > The a

RE: [PHP] Variable name declarations?

2001-07-14 Thread Kent Sandvik
> function sum_array( $input_array ) > { > var $index; > var $sum = 0; > > for( $index = 0; $index < count( $input_array ); $index++ ) > $sum += $input_array[ $index ]; > > return $sum; > } The array variable issue has indeed bitten me a couple of times, so now all my arr

Re: [PHP] Variable name declarations?

2001-07-13 Thread Rasmus Lerdorf
> Does anyone else have any thoughts on this? error_reporting = E_ALL in your php.ini file and PHP will warn you whenever you use an unitialized variable. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMA

RE: [PHP] Variable name declarations?

2001-07-13 Thread scott [gts]
> -Original Message- > From: Matthew Aznoe [mailto:[EMAIL PROTECTED]] > Subject: [PHP] Variable name declarations? > > However, I do have one complaint about PHP that seems to have a tendency to > bite me far too often, and that is the lack of variable declaration. While > I do not thi

Re: [PHP] Variable name declarations?

2001-07-13 Thread Zak Greant
Hi Matthew, Set your error_reporting level to E_ALL. The parser will then report the use of undeclared variables. --zak - Original Message - From: "Matthew Aznoe" <[EMAIL PROTECTED]> To: "php" <[EMAIL PROTECTED]> Sent: Friday, July 13, 2001 2:22 PM Subject: [PHP] Variable name declarat