Re: Re: Undefined Variable in IF...ELSE IF ...ELSE IF (NEWBIE ?)

From: Date: Fri, 15 Mar 2002 20:15:52 +0000
Subject: Re: Re: Undefined Variable in IF...ELSE IF ...ELSE IF (NEWBIE ?)
Groups: php.general 
Request: Send a blank email to php-general+get-88699@lists.php.net to get a copy of this message
Thank You Charlie. I also found out that I needed to put an "@" symbol infrom of the string. This stopped it from throwing me an error. If(@$submit) blah blah blah Thank You <><><><><><><><><><><><><><><><> Daniel Negrón Lotus Notes Administrator / Developer KB Electronics, Inc. 954.346.4900x122 http://www.kbelectronics.com <><><><><><><><><><><><><><><><> |--------+------------------------> | | "Charlie | | | Killian" | | | <charlie@tizac| | | .com> | | | | | | 03/15/02 03:04| | | PM | | | | |--------+------------------------> >>---------------------------------------------------------------------------------------------------------------------------------------------| | | | To: php-general@lists.php.net | | cc: | | Subject: [PHP] Re: Undefined Variable in IF...ELSE IF ...ELSE IF (NEWBIE ?) | >>---------------------------------------------------------------------------------------------------------------------------------------------| >I have error's enabled in php.ini. I keep getting Undefined variable when >I run a script that contains IF or ELSE IF's. Is this normal because the >variable hasn't been set at the beginning of the script ? Yes. If the variable hasn't been defined previously you'll get a warning: if ( $dd > 2) true; Will warn unless $dd is initialized prior to the if(). Charlie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#88699) next »