Timeline for Using in_array for multidimensional arrays
Current License: CC BY-SA 3.0
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 4, 2014 at 19:52 | comment | added | Rizier123 | @Adelphia Yes true!, but for me it would be to nested. | |
| Nov 4, 2014 at 19:51 | comment | added | I wrestled a bear once. |
you could simplify that a bit: return (($strict ? $item === $needle : $item == $needle) || (is_array($item) && in_array_r($needle, $item, $strict)));
|
|
| Nov 4, 2014 at 19:48 | history | answered | Rizier123 | CC BY-SA 3.0 |