Note that using strings without quotes generates a warning that is not
displayed in the default configuration of PHP. The message looks like
"Warning: Use of undefined constant anyString - assumed 'anyString' in
test.php on line 3"
(line 3: echo anyString;)
If you want to see these warnings, set
error_reporting = E_ALL
instead of
error_reporting = E_ALL & ~E_NOTICE
in php.ini
--- "Jason Bell" <[EMAIL PROTECTED]> wrote
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
--
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]