echo php
snippet in php

How to show php text

user8853

<?php
  echo "Hello World!";
// You can also do this with a variable:
$YourVariable = "Hello World!";
echo $YourVariable;
?>

print in php

user9315

print_r("");

print php variable with text

user313

<?php
echo "<h2>PHP is Fun!</h2>";
echo "Hello world!<br>";
echo "I'm about to learn PHP!<br>";
echo "This ", "string ", "was ", "made ", "with multiple parameters.";
?> 

how to echo 2 variables in php

user8557


<?php
$str1="Hello world!";
$str2="What a nice day!";
echo $str1 . " " . $str2;
?> 
 

echo php

user1974

<?php 
$string = "Hello, World!";
echo $string;
?>