- print_r: documentation ( source)
- in_array: documentation ( source)
<?php
$array = array(
'egg' => true,
'cheese' => false,
'hair' => 765,
'goblins' => null,
'ogres' => 'no ogres allowed in this array'
);
// Loose checking -- return values are in comments
// First three make sense, last four do not
print_r(in_array(763, $array)); // true
in_array('egg', $array); // true
in_array('hhh', $array); // true
in_array(array(), $array); // true