예제
<?php
$yes = array('this', 'is', 'an array');
echo is_array($yes) ? 'Array' : 'not an Array';
echo "\n";
$no = 'this is a string';
echo is_array($no) ? 'Array' : 'not an Array';
?>
출력 :
Array
not an Array
'Code Snippets > php' 카테고리의 다른 글
함수 : str_replace (0) | 2014.08.25 |
---|---|
함수 : explode / implode (0) | 2014.08.18 |
함수 : is_resource (0) | 2014.08.08 |
함수 : serialize / unserialize (0) | 2014.08.05 |
함수 : array_shift (0) | 2014.08.01 |