Write the value of the string variable to the output including HTML tags in PHP

Description

The following code shows how to write the value of the string variable to the output including HTML tags.

Example


/*  ww w. ja v a2s.  com*/
<?php
   $str = "Hello world!";
   echo $str;
   echo "<br>What a nice day!";
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Development »




Environment
Error
Hash
Include
Locale
Math
Network
Output
Reflection
PHP Regular Expressions