Re: String Comparison
| From: | Jason Bell | Date: | Tue, 24 Jul 2001 23:02:51 +0000 |
| Subject: | Re: String Comparison | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-59449@lists.php.net to get a copy of this message | ||
oh wait.. I just realize my goof.... it is treating it like I want to
divide image by pjpeg. LMAO
*sigh* I guess I should just go home while I'm ahead. haha
-Jason
----- Original Message -----
From: "Jason Bell" <jbell@barkingrat.com>
To: "PHP Users" <php-general@lists.php.net>
Sent: Tuesday, July 24, 2001 3:59 PM
Subject: [PHP] String Comparison
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