PHP Tutorial Part-2 || PHP echo & print

in Hindwhale Community2 months ago



PHP Tutorial Part 3 || PHP echo & PHP print

PHP reverberate and print Statements
With PHP, there are two fundamental ways to get yield: resound and print.

In this instructional exercise we utilize resound or print in nearly each case. So, this chapter contains a small more data almost those two yield statements.

PHP reverberate and print Statements
echo and print are more or less the same. They are both utilized to yield information to the screen.

The contrasts are little: reverberate has no return esteem whereas print has a return esteem of 1 so it can be utilized in expressions. resound can take numerous parameters (in spite of the fact that such utilization is uncommon) whereas print can take one contention. resound is possibly speedier than print.

The PHP reverberate Statement
The resound articulation can be utilized with or without brackets: resound or echo().

Example:

Display Text
The taking after illustration appears how to yield content with the resound command (take note that the content can contain HTML markup):
Example:

Display Variables
The taking after case appears how to yield content and factors with the reverberate statement:
Example:

Using Single Quotes
Strings are encompassed by cites, but there is a distinction between single and twofold cites in PHP.

When utilizing twofold cites, factors can be embedded to the string as in the case above.

When utilizing single cites, factors have to be embedded utilizing the . administrator, like this:
Example:

The PHP print Statement
The print explanation can be utilized with or without enclosures: print or print().
Example:

Display Text
The taking after case appears how to yield content with the resound command (take note that the content can contain HTML markup):
Example:

Display Variables
The taking after case appears how to yield content and factors with the reverberate statement:
Example:

Using Single Quotes
Strings are encompassed by cites, but there is a distinction between single and twofold cites in PHP.

When utilizing twofold cites, factors can be embedded to the string as in the case above.

When utilizing single cites, factors have to be embedded utilizing the . administrator, like this:
Example:

Please see my previous tutorials ...
Part 1 Link
Part 2 Link

Sort:  
 2 months ago 

You couldn't promote your post properly on Twitter. There are two things you need to do to properly promote your post on Twitter:

  1. Write a description of your post (you can use your post title if you want)
  2. #steem #steemit $steem these three essential tags must be used.
    Hope you have understood everything about Twitter promotion properly.
Loading...

Coin Marketplace

STEEM 0.21
TRX 0.20
JST 0.035
BTC 91413.32
ETH 3152.41
USDT 1.00
SBD 3.07