Answers for "how to check array in php"

PHP
4

php isarray

<?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 April-12-2020
0

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 "how to check array in php"

Browse Popular Code Answers by Language