RE: [PHP] initialization of variables
| From: | John Coggeshall | Date: | Tue, 25 Jul 2000 00:31:01 +0000 |
| Subject: | RE: [PHP] initialization of variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7857@lists.php.net to get a copy of this message | ||
Well I'm not sure that this problem is what you think it is.... but....
if(isset($temp) && ($temp == 10)) {
}
John
-----Original Message-----
From: gautam [mailto:gautamw@mahindrabt.com]
Sent: Monday, July 24, 2000 6:56 AM
To: php-general@lists.php.net
Subject: [PHP] initialization of variables
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net