|
Posted by Michael Fesser on 12/21/06 13:05
..oO(Els)
>Could I mix those two things, like so:
>$values = array(range(1, 4),17,30);
That would make the array returned by range() a sub-array of $values,
which won't work as expected with in_array(). To solve that you could
* use array_merge() to merge both arrays together before calling
in_array()
* write a function in_array_recursive() to search in a nested array
structure if necessary
Micha
Navigation:
[Reply to this message]
|