A space is a valid string. Are you sure there is a space?

<?
$a = ' ';
if($a == '') {
  echo "a is blank<br>";
} else {
  echo "a is not blank<br>";   // this is printed
}

if(is_null($a)) {
  echo "a is null<br>";
} else {
  echo "a is not null<br>";   // this is printed
}
?>

Kirk

> > I need to check variables for blank values but it appears 
> that is_null and
> > =="" return true if there is a space.
> >
> > Any other suggestions?

-- 
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]

Reply via email to