jayg5000
Feb 29th 2008, 1:51 pm
I am trying to search an array to see if it contains a certain word but the in_array(); function (form what I can see) needs to be the exact value of the array values. Here is an example:
$fruit = array('Green Apple', 'Yellow Banana', 'Red Cherry');
How would I search $fruit to see if it contains the word "Green" or "Cherry?" Maybe I'm thinking so hard I can't see the simple solution. Thanks for any help.
$fruit = array('Green Apple', 'Yellow Banana', 'Red Cherry');
How would I search $fruit to see if it contains the word "Green" or "Cherry?" Maybe I'm thinking so hard I can't see the simple solution. Thanks for any help.