PHP: Var_dump($variable) – The SAVIOUR!

If you are trying to display a variable’s value in PHP and it just wouldn’t show up, don’t fret! Chances are the variable’s value is null or empty string or can be any other reason. To research it, pass the variable info to var_dump() function and it displays on screen, information about the variable like its type and what it evaluated to

Eg: $value be the variable you are wanting to research, say because it is not displayed on screen when you echo $variable , do this

echo var_dump($variable)

C ya :*

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s