Leonie wrote:

I have this code:

 if (!$path) {
  $path = getPath();
 }

Sometimes $path is set (there are forms on the page that can change it).
When the page is first displayed:

Notice: Undefined variable: path in e:\program/  etc...
It then gives a reference to the line:   if (!$path) {

Is there a way to get rid of this annoying notice?

if(!isset($path)) { $path = getPath(); }

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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



Reply via email to