Yeah, I got these kind of warning when I set error_reporting(E_ALL);
Anyway, this shouls do it:
<?php
if (isset($x)) {
echo $x;
}
// You could even do this:
if (isset($x)) {
if ($x) {
echo $x;
}
}
// But I guess it would be redundant :-)
?>
The point is when you get 'non defined var', just define it before, even
empty (i.e, $x = '') or check it with isset();..
--
Julio Nobrega.
Um dia eu chego l�:
http://sourceforge.net/projects/toca
"Harald Witt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I have a hopefully simple problem. Look at the following simple script:
>
> <?php
> if ($x) {
> echo $x;
> }
> ?>
>
> This script runs properly on my productive system (Linux, Apache, PHP
> 4.0.3pl1). But on my Development-System (W2k Server, Apache 1.3.20, PHP
4.0.6) I
> always get a Warning, that variable x in not definded.
> Ok, thats true. But how can I suppress that Messages??? They destroy my
> HTML-Code. I've searched in the PHP.INI file, but I can't find anything,
that
> looks like warning-suppression.
>
> Thanx for your help
>
> Harald
>
> --
> GMX - Die Kommunikationsplattform im Internet.
> http://www.gmx.net
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]