String Comparison

From: Date: Tue, 24 Jul 2001 22:59:01 +0000
Subject: String Comparison
Groups: php.general 
Request: Send a blank email to php-general+get-59448@lists.php.net to get a copy of this message
Hello. I'm trying to compare two strings, and performa function if the are the same. Easy right? I thought so until I tried it... $query = "select type from images where id=$id"; $result = mysql_query($query); $type = mysql_result($result,0,"type"); print $type; if (image/pjpeg == $type) { print "Type is JPG"; }; returned: image/pjpeg Warning: Division by zero in /home/daelic/www/photo/mkthumb.php on line 8 Any idea on why this won't work? Thanks! Jason

« previous php.general (#59448) next »