initialization of variables

From: Date: Mon, 24 Jul 2000 10:56:08 +0000
Subject: initialization of variables
Groups: php.general 
Request: Send a blank email to php-general+get-7854@lists.php.net to get a copy of this message
hi all, i have a small problem in php 4.0.1 which i didn't face earlier. I set some variables. it they are not set and i try to echo them they give a problem. for instance, if ($temp == 10) { $disp = "temp is 10"; } echo $disp; if temp is not 10 then when echo is processed and the output is displayed on the browser, i get the following error: "Warning: Undefined index: temp in testing.php on line xx" what can be the solution for this? thanks in advance, gautam. -- If it is to be, it is up to me

« previous php.general (#7854) next »