PHP – Print Function and New Line Command in…

The Print Function in PHP allows you to print text to dynamically create a web page. It’s important to understand that what you see in a web browser is different then what you would see as plain text.

 

<H1> PHP Print Example</H1>

<?php
print ” -Print Item 1″;
print ” -Print Item 2″;
print ” -Print Item 3″;
?>

<H1> PHP Print with \n Example</H1>

<?php
print ” -Print Item 1\n”;
print ” -Print Item 2\n”;
print ” -Print Item 3\n”;
?>

<H1> Stupid \n Example</H1>
<?PHP
print ” -P\nr\ni\nn\nt\n I\nt\ne\nm\n 1\n”;
?>

 

Be the first to comment

Leave a Reply