Re: Newbie - is there a function similar to the sql 'like' comparison operator?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi RevDave

Theres the similar_text() function which calculates the procentage of te similarity between
two strings.

If your looking for a check to see if a string has some specified text then use the strpos() function and then the identical comparison operator to check for true and false


Kalle Sommer Nielsen
DR - www.dr.dk

----- Original Message ----- From: "revDAVE" <Cool@xxxxxxxxxxxxxxxx>
To: "PHP General" <php-general@xxxxxxxxxxxxx>
Sent: Thursday, May 08, 2008 5:20 PM
Subject: Newbie - is there a function similar to the sql 'like' comparison operator?


Newbie - is there a function similar to the sql 'like' comparison operator?

I would like to be able to compare 2 strings:

If $this ---*like or similar to*--- $that

That type of thing...


I know of this page:

http://us3.php.net/manual/sl/language.operators.comparison.php


But I don't see something 'like' or 'similar' to something else


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




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





--
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.23.10/1421 - Release Date: 07-05-2008 17:23




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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux