LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Kalle Sommer Nielsen Date: Thu May 8 09:30:16 2008 Subject: Re: Newbie - is there a function similar to the sql 'like' comparison operator?
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@hosting4days.com> To: "PHP General" <php-general@lists.php.net> Sent: Thursday, May 08, 2008 5:20 PM Subject: [PHP] 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 > >
| Navigate in group php.general at sever news.php.net | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |