how to check isarray in php code example Example: javascript check for undefined if (typeof myVariable === 'undefined'){ //myVariable is undefined }