Hello mayo,

Sunday, January 18, 2004, 6:06:41 PM, you wrote:

m> I would like to compare strings. I'm using this for my navigation

m> IF $title CONTAINS "abc: def"

m> Comparing the number of characters in one string with another does not do
m> the trick. (strcmp)

If I have understood your pseudo code correctly then you're not really
comparing strings, you're just checking to see if a string contains a
set of characters (i.e. another string).

There is no reason why you couldn't do:

if (strpos($title, "abc: def") === false)
{
   // not found
}
else
{
    // do stuff
}

-- 
Best regards,
 Richard                            mailto:[EMAIL PROTECTED]

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

Reply via email to