Horje
is array Code Example
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';
?>

Source: www.php.net
javascript check if is array
var colors=["red","green","blue"];

if(Array.isArray(colors)){
    //colors is an array
}
javascript typeof array
Array.isArray(arr)
js is array
Array.isArray([1, 2, 3]);   // true
Array.isArray({toto: 123}); // false
Array.isArray("tototruc");  // false
Array.isArray(undefined);   // false
isempty for arrays
Object arr[] = new Object[10];
boolean empty = true;
for (int i=0; i<arr.length; i++) {
  if (arr[i] != null) {
    empty = false;
    break;
  }
}




Javascript

Related
Context hook Code Example Context hook Code Example
display array javascript Code Example display array javascript Code Example
age from date Code Example age from date Code Example
encodeurl in javascript Code Example encodeurl in javascript Code Example
calculate age from date of birth js Code Example calculate age from date of birth js Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
6