Answers for "check variable is array in php"

PHP
0

is_array Php

<?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';
?>
Posted by: Guest on December-28-2021
-1

is array php

$arr = 'This is not array only string';
 
if ( is_array($arr)) {    
    echo 'Available';
}
Posted by: Guest on September-25-2021

Code answers related to "check variable is array in php"

Browse Popular Code Answers by Language