I have an array value like this. I tried array_search and it is of no use. Just what I want is to filter only the array values that have status value.
Output
Array
(
[1] => Array
(
[author] => Author1
[book] => Book1
[status] => 1
)
[2] => Array
(
[author] => Author2
[book] => Book2
)
[3] => Array
(
[author] => Author3
[book] => Book3
[status] => 1
)
)
Expected Output
Array
(
[1] => Array
(
[author] => Author1
[book] => Book1
[status] => 1
)
[3] => Array
(
[author] => Author3
[book] => Book3
[status] => 1
)
)
I will be more happy if the expected output has the proper number sequence. In the above case there are two arrays with array number as [1] and [3] . If possible i need to make it as [1] and [2].
Any help will be very useful.
Thanks, Kimz