toe_head2001
04-21-2009, 09:31 PM
Is there a way to use in_array() to check if a given value is present as [id] in any the sub arrays with out specifying [0], [1], ect first?
I can't do in_array($value, $stuff[0][id]), in_array($value, $stuff[1][id]), ect. I number of arrays with in $stuff will always to different.
$stuff = Array
(
[0] => Array
(
[id] => 546
[quant] => 671
[notes] => none
)
[1] => Array
(
[id] => 123
[quant] => 1
[notes] => ninguno
)
[2] => Array
(
[id] => 542
[quant] => 15
[notes] => ...
)
[3] ect.
)
I can't do in_array($value, $stuff[0][id]), in_array($value, $stuff[1][id]), ect. I number of arrays with in $stuff will always to different.
$stuff = Array
(
[0] => Array
(
[id] => 546
[quant] => 671
[notes] => none
)
[1] => Array
(
[id] => 123
[quant] => 1
[notes] => ninguno
)
[2] => Array
(
[id] => 542
[quant] => 15
[notes] => ...
)
[3] ect.
)