The following test script for the function strcmp() is from page 114 -115 of
PHP (Hungry Minds).

I'm getting a parse error on line 6.

Using PHP 4.1.1 / MS Win 98 / Apache Server.

Many thanks...
Tony Ritter
..........................................

<?
// using strcmp()
$firstword="peach";
$secondword="mango";
$result=strcmp($firstword, $secondword)
if ($result>=1)
 {
  $statement="comes after";
 }
else if ($result<=-1)
 {
  $statement="comes before";
 }
else
 {
  $statement="is the same as";
 }
echo "The word <b>$firstword</b> $statement";
?>





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to