Learn PHP - PHP Echo and PHP Print theory and examples

preview_player
Показать описание
In this PHP tutorial we explore the PHP echo and PHP print language constructs by first looking at the theory and then we look over some examples of echo and print in use.

0:00 Introduction
0:35 Key points
2:13 Examples of Echo
5:38 Examples of Print
6:13 Example that Print can not take multiple parameters
7:33 Echo shorthand code
7:44 Example of Print as an expression

First we cover some of the very basic theory of PHP echo and PHP print,. We discover that they are both used to output data to the screen. They are both language constructs, not functions therefore do not require parentheses.

Furthermore, print, unlike echo, is an expression (it returns 1). PHP Echo can take multiple values where as PHP Print takes one argument

I take you through a range of examples putting theory into practice where we use both PHP print and PHP echo to print variables, strings, use concatenation and discover we can also output HTML.

Learn PHP 7 – Check out my other PHP tutorials for beginners
If you like this PHP tutorial you will love our PHP tutorials for beginners course where we hope to teach you some of the basic functionality of PHP in a practical and fun way.

SUBSCRIBE to get more free tutorials, courses and code snippets!

Follow us on Facebook

Follow use on Twitter:
Рекомендации по теме