Is it an array : is_array « Data Structure « PHP
- PHP
- Data Structure
- is_array
Is it an array
<?php
$yes = array('this', 'is', 'an array');
echo is_array($yes) ? 'Array' : 'not an Array';
echo "<br />";
$no = 'this is a string';
echo is_array($no) ? 'Array' : 'Not an Array';
?>
Related examples in the same category