RE: [PHP] odd results with database string comparisons

From: Date: Thu, 12 Aug 2004 19:07:19 +0000
Subject: RE: [PHP] odd results with database string comparisons
Groups: php.general 
Request: Send a blank email to php-general+get-193629@lists.php.net to get a copy of this message
[snip] I have a database table with the column described as address_line_2 varchar(255) NOT NULL default '', if($row["address_line_2"]==' ') // there is a space between the quotes [/snip] address_line_2 varchar(255) NOT NULL default '', <--- no space between quotes so if('' == $row['address_line_2]){ //no space between quotes echo "&nbsp"; } else { echo $row['address_line_2']; } HTH

« previous php.general (#193629) next »