Hello,
Here I can Give both of use echo and print in php. I give example and use.
Echo and Print are almost same. they are both output on screen. they are used with and without
parentheses.
Here I can Give both of use echo and print in php. I give example and use.
Echo and Print are almost same. they are both output on screen. they are used with and without
parentheses.
Difference Echo And Print
- print return value and echo not return value.
- echo faster than print.
- echo without parentheses can take multiple parameters, which get concatenated but print give error.
How Can Use.
$data = "hello".
$data1 ="jaydip";
echo "<h2>My echo information</h2>";
echo "namste !<br>";
echo $data."".$data1;
echo without parentheses can take multiple parameters
echo "jj","123",1,3;
same like in Print:
$data = "hello".
$data1 ="jaydip";
print "<h2>My echo information</h2>";
print "namste !<br>";
print $data."".$data1;
you can use as print in
$test=1;
($test==2) ? print "true" : print "false";
0 komentar:
Post a Comment