SQL PHP HTML ASP JavaScript articles and free scripts to download
PHP Declaring Variables

var_dump

By using var_dump function we can get all details about the variable used. This function returns nothing and can take more than one variable as input. Let us try some examples.
$a=5;
var_dump($a);
The above code will return like this
int(5)
Now let us try bit different by using one string variable
$a='testing';
var_dump($a);
The output is here
string(7) "testing" 
We get all information about the string variable $a in above line. The length of the string is 7 here. Now let us try by using more than one variable.
$a=5.9;
$b='testing';
var_dump($a,$b);
Output is here
float(5.9) string(7) "testing"
We can add one array variable to our input to var_dump function.
$a=5.9;
$b='testing';
$ar=array('testing',' only ', ' at ', ' plus2net');
var_dump($a,$b,$ar);
The output is here
float(5.9) string(7) "testing" array(4) 
{ [0]=> string(7) "testing" [1]=> string(6) " only " [2]=> string(4) " at " [3]=> string(9) " plus2net" }

Google+
Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked



HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2014 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer