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:$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.

No comments:

Post a Comment