I want to search an array to see if it has "()" in it, and then return the index number of the string in the array. How?
How to retrieve index number of an array in PHP?
If the text is exactly equal to "()", you can use the array_search function
$index = array_search("()",$arrname);
where $arrname is the name of the array
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment