Get variable type PHP


Description
Get the type of a variable.


$type_name = gettype( $var );
Returns: "boolean", "integer", "double", "string", "array", "object", "resource", "NULL" or "unknown type".

SEE ALSO