If my array is formatted like this:
Array (
[0] => Array (
[0] => Informatics [TitleName] => Informatics
[1] => Informatics [TitleValue] => Informatics
[2] => 1 [CategoryID] => 1
[3] => [SecondaryCategory] =>
)
)
How do I pull out all the values that are CategoryID == 1 ?
Ive tried several while loops but it does not seem to be working properly. Can Anyone help me out with this? Perhaps a while loop is not what I need.
Search for a value inside an array:
http://php.net/manual/fr/function.array-search.php
Returns the key in the array ($haystack) if the value ($needle) exists.
Returns FALSE if the $needle is not found in the $haystack.