Answers for "php check if a variable is an array"

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

Code answers related to "php check if a variable is an array"

Browse Popular Code Answers by Language