Page 1 of 1

Selecting one word out of a phrase

Posted: Wed Aug 15, 2007 1:19 am
by Mr Tech
In mysql, you can do something like this:

Code: Select all

select row from table where field like '%test%'
That will select from any field that has test in it.

How do you do that in PHP. For example:

Code: Select all

if ($variable == "%test%") {
Is that possible?

Posted: Wed Aug 15, 2007 1:20 am
by Christopher