PHP Tutorial Part-2 || PHP echo & 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
X/Twitter share link
https://x.com/Mahabubcmt8Alam/status/1837500417514918152
You couldn't promote your post properly on Twitter. There are two things you need to do to properly promote your post on Twitter:
Hope you have understood everything about Twitter promotion properly.