PHP Print - Code

PHP Echo Previous Next PHP Date


PHP print statement is used to get output ex: text output and variables output etc.

print statement can be with print or without paranthesis print().

print statements can be with single ' quotes or double"" quotes.

We trying to cover all possiblity of print to learn better and deeply.

Following are the syntax of echo given below.

Syntax


print '';

print "";

print $variables;

print $variables='';

print $variables="";

You can use all html tag inside quotes or paranthesis

Filename: php / print-s-quotes.php


Code
<?php
// Print single quotes Statements
print '

Hello PHP

'; print 'Hello World
'; print '

This is paragraph.

'; print 'Some Text...'; print 'Hello'.'Text'.'
'; print '
'; ?>

Running Step.


Type Url - https://localhost/php/print-s-quotes.php

PHP print Statements in Double Quotes.

Filename: php / print-d-quotes.php


Code
<?php
// print double quotes statements
print "

Hello PHP

"; print "Hello World
"; print "

This is paragraph.

"; print "Some Text..."; print "Hello"."Text"."
"; print "
"; ?>

Running Step.


Type Url - https://localhost/php/print-d-quotes.php


Tags: PHP Print PHP Code Programming Language


Was this helpful ?

Related Code