$type = gettype( $variable );
var_dump( $variable );
Second line shows another easy way to show variable type, but it works by outputing result and you cannot grab it to variable. But second way can traverse arrays recursive and show all of its contents. Also it will show you all informations about any object.
PHP Coding tips & tricks. Function & error explanation, coding style, how tos etc. Short notes posted directly from developer work environment.
PHP Coding Tips
Friday, August 17, 2012
PHP Integer - how to determine if a value is a number in PHP ?
You can check type of a varaible in php calling gettype:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment