tmh766 Posted February 16, 2007 Share Posted February 16, 2007 Is there a way to search an array for a substring of a cells contents and return the cell. array_search() seems to only be able to find the cell when the whole string is searched for, not part of it. Quote Link to comment Share on other sites More sharing options...
tmh766 Posted February 16, 2007 Author Share Posted February 16, 2007 Is it not possibe to search for a substring in an array and return the cell. Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted February 17, 2007 Share Posted February 17, 2007 Yet again, the manual holds the answer... http://us3.php.net/manual/en/function.array-search.php#71746 The function provided there can very easily be modified to use the str_pos function, strstr function, or any other string function if you are not comfortable with regular expressions. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.