PHP FOR BEGINNERS #1 - Print() and echo() methods main differences

preview_player
Показать описание

:: Support Me ::

Join this channel to get access to perks:

Get some swag:

:: Tutorial Series ::

:: My Website ::

:: Follow me on ::

:: Timestamp ::
00:00 Introduction
00:19 Lesson topic
00:25 Define your first variable
00:40 Use the echo() method
00:55 Use the print() method
01:14 Differences between echo and print
03:02 When to use print() instead of echo()

#php #tutorials #coding
Рекомендации по теме
Комментарии
Автор

Great job for the PHP-community, THANKS 🙂

Lyrik-Klinge
Автор

Great video as always! I use echo and print every day, always wondered what was the difference never cared enough to go look. So this definitely satiated my curiosity a bit.

donte_henley
Автор

Great video, but there's two things I'd like to share.
First, with "print", and also with "echo", you can concatenate using the PHP concatenation operator, the dot:
print 'This is printed' . ' and I can concatenate' . ' strings';

Second, you can't use "echo" inside ternary operator but you can use "echo" with it this way:
echo ($x === 1) ? 'Yes' : 'No';

mdiluffy
Автор

Please try to upload every day at least 2 videos. Waiting for the OOP concept or making a separate playlist for the OOP concept. If possible for you. Please do.

ck
Автор

very clear explanations👏. One question: what is the reason when you say that echo is forbidden in the ternary operator? Thx.

edu