PHP echo/print statements in Hindi

php echo/print statement introduction

php में echo और print दोनों ही statement output को display करने के लिए इस्तेमाल होते है| echo और print statement में थोड़ी similarity और different बी है|
echo statement में multiple parameter सेट कर सकते है जब की print statement में एक ही parameter रख सकता है यही echo statement, print statement से fast बी है|
php echo statement को perentheses echo() के साथ और उसके बिना echo बी लिख सकते है||

php echo statement

Example:

use text with echo statement

<?php
 echo "<p>php echo/print statement</p>";
 echo "hello world <br>";
 echo "hello i am visitor";
 echo "hello", "same","how","are you", "??";
?>

output:

php echo/print statement
hello world
hello i am visitor
hellosamehoware you??

use variables with echo statement

<?php
   $var1 = "hello echo/print with variable";
   $var2 = "hello i am new visitor";
   $a = 3;
   $b = 4;
   $c = $a + $b;
   echo $var1."<br>";
   echo $var2."<br>";
   echo $var2."no".$a."<br>";
   echo $c;
?>

output:

hello echo/print with variable
hello i am new visitor
hello i am new visitorno3
7

php print statement in hindi

Example:

<?php
  $wp = "wordpress";  
  $str = print $wp." is best CMS in the world.";  
  print "</br>";  
  print "Print statement is return: ".$str;   

?>

output:

wordpress is best CMS in the world.
Print statement is return: 1

Leave a Comment

Your email address will not be published. Required fields are marked *