PHP String Data Type - Heredoc & Nowdoc Syntax - Full PHP 8 Tutorial

  Рет қаралды 63,315

Program With Gio

Program With Gio

Күн бұрын

In this video, we go over the basic string syntax and multiline strings using Heredoc & Nowdoc syntax. I will show you when & why you would use heredoc & nowdoc syntax to define your strings.
SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL
👍 Smash the like button
🤝 Subscribe to the channel & turn the notifications on
💬 Post comments, any feedback is greatly appreciated
⭐ Become a Patreon: / programwithgio
THANK YOU!
LESSON 1.8
Course Outline - github.com/gge...
Course Playlist - • Learn PHP The Right Wa...
RESOURCES
List of useful string functions - www.php.net/ma...
Details about heredoc & nowdoc syntax - www.php.net/ma...

Пікірлер: 128
@mazadesigndev295
@mazadesigndev295 3 жыл бұрын
A few weeks ago I was reading up on Heredoc and Nowdoc and just didn't grasp it. This video has changed that and I can now see the purpose. Thank you for bringing this one to the table!
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
Great to hear that. You're welcome 👍
@timstreithoff
@timstreithoff 2 жыл бұрын
I really love your tutorials because youre litterally wasting none of my time. In other tutorials, you always have to wait until useful content is delivered. With your videos, everything is brought on point without any blabla and I love your quite fast speaking as it helps me concentrate. Many thanks for this masterpiece of tutorial series ❤
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
So glad to hear that, thank you so much 💙💙
@schwkrls
@schwkrls Жыл бұрын
Your videos are so insanely concise yet they're still more informative than other series I've tried. Thank you for your tutorials!
@ProgramWithGio
@ProgramWithGio Жыл бұрын
Happy to hear, thank you 🙌
@andriusgeciauskas3154
@andriusgeciauskas3154 6 ай бұрын
by far best php introduction that I have came across give this guy a credit!
@ProgramWithGio
@ProgramWithGio 6 ай бұрын
Thank you 💙💙
@Saturate0806
@Saturate0806 2 жыл бұрын
nl2br? brb, need to do some refactoring
@rimantasdanilevicius6754
@rimantasdanilevicius6754 3 жыл бұрын
Another great short video with useful content which no one talks about! Thanks for making so much useful lessons!
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
You're welcome, glad you liked it
@arnobislam1615
@arnobislam1615 2 жыл бұрын
GREAT AND VERY CLEAR EXPLANATION. LOVE FROM BANGLADESH
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Thanks and welcome
@itwebadmin
@itwebadmin 2 жыл бұрын
That Will Smith string hit different now...
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
😂😂 good one
@cristianvulpe1408
@cristianvulpe1408 3 жыл бұрын
Another clear and concise video, thanks a lot 👍
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
You're welcome & thank you 🙌
@dgloria
@dgloria 3 жыл бұрын
I love tutors who answer the questions as they pop up in my brain! Exactly what I wanted to ask, if it can be used to include html. :)
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
Haha. Glad I could answer your questions 🙂
@karam0101
@karam0101 2 жыл бұрын
Thank you for these great videos, I guess it is worth to mention that If the closing identifier is indented further than any lines of the body, then a Parse Error will be thrown.
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Great point, thank you 💙
@karam0101
@karam0101 2 жыл бұрын
@@ProgramWithGio Thank you sir, you're the best
@migueldemaria3830
@migueldemaria3830 3 жыл бұрын
nl2br? You know so many tricks, I love it!
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
Thank you, glad you like my videos 🙌
@ikpeessien7399
@ikpeessien7399 Жыл бұрын
Thank You so much, your tutorial is bravo zulu. You just stepped in to fill the lecture gap and bless those interested in php. what a good heart
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You are welcome, thank you 💙
@andergraund9327
@andergraund9327 3 жыл бұрын
Great explanation, very clear
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
Thank you
@vladimirputindreadlockrast812
@vladimirputindreadlockrast812 Жыл бұрын
/* Video made before the 94th Academy Awards on March 27, 2022 */ $firstname = "Will"; $lastname = "Smith";
@ProgramWithGio
@ProgramWithGio Жыл бұрын
😂😂
@SynMlyn
@SynMlyn 8 ай бұрын
Gio, your tutorials are a treasure trove of PHP knowledge. Thank you!
@ProgramWithGio
@ProgramWithGio 7 ай бұрын
Thank you
@karolkolanko594
@karolkolanko594 Жыл бұрын
4:43 No! That function doesn't change new lines to break lines. It's insert break lines before all newlines.
@ProgramWithGio
@ProgramWithGio Жыл бұрын
That's correct, I misspoke, it inserts before the newline characters while keeping them instead of replacing. Thanks 👍
@Irfan-Rajput-Laravel-Developer
@Irfan-Rajput-Laravel-Developer Жыл бұрын
Sir, I have a question if we want to perform the addition of two dynamic variables in heredoc or now-doc its possible
@ProgramWithGio
@ProgramWithGio Жыл бұрын
No, don't think so. You would do the addition operation as a separate statement, store result in variable & use that variable in heredoc
@Herobotick2025
@Herobotick2025 3 жыл бұрын
Straight to the point you are awesome
@МиткоЖечев
@МиткоЖечев Жыл бұрын
$lastName = "${firstName} Smith" is deprecated.
@ProgramWithGio
@ProgramWithGio Жыл бұрын
Yup, this was recorded awhile ago. We cover deprecations and what's new in 8.1 and 8.2 in later episodes
@emonklas1046
@emonklas1046 2 жыл бұрын
Sir, plz make a video about the carrier of CODING, or give a guideline for becoming a pro coder and which language is better to earn money as a student. I am your regular student Lots of TNX from BANGLADESH.
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Thanks for the suggestion, will add this to the list
@yahayaoyinkansola8258
@yahayaoyinkansola8258 Жыл бұрын
This heredoc and nowdoc is beautiful!, this is like using ES6 concatenation in JS, but for PHP. the only issue that I see is using a proper identifier indicating what it's doing, but aside from that, it is really cool
@ProgramWithGio
@ProgramWithGio Жыл бұрын
Yea, it comes in handy for long texts
@begoniasuccess
@begoniasuccess 3 жыл бұрын
Your tutorial is amazing! It really helps me a lot. :)
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
Glad to hear that, thank you 🙏
@bjornroesbeke
@bjornroesbeke 2 жыл бұрын
I started writing scripts with PHP4, and it took this video on basics of the language to tell me that something has been deprecated ánd learn me new things that i've never seen bevore.
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Glad it was useful, thank you
@araromirichie4825
@araromirichie4825 2 жыл бұрын
Please can you explain why the two p tags inside the div in the heredoc example gave an output of so much space between hello and world in the browser? Anyone who knows why can answer please thanks
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Its the default browser margin I believe, also my screen is zoomed in.
@nyinyiandnyinyi
@nyinyiandnyinyi 7 ай бұрын
Learned a lot of basics from this tutorial which are not covered in others. Really really useful and good for a beginner... thanks a lot Gio
@ProgramWithGio
@ProgramWithGio 7 ай бұрын
Awesome, happy to hear
@nbsalemyt
@nbsalemyt 2 жыл бұрын
Awesome work but better to put sequence number on each clip name (1.8 - PHP String Data Types .....)
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Thank you. That does not work well with KZbin's algorithm & recommends my videos less when it has sequence numbers. Thats why I put it in thumbnail & also have a github repo that lists all videos in order. Link is in the description.
@jorgegatica
@jorgegatica Жыл бұрын
Gracias por los videos, explicados muy al detalle. Desafortunadamente, este video KZbin no tiene habilitada la traducción como en los anteriores .
@ProgramWithGio
@ProgramWithGio Жыл бұрын
KZbin adds subtitles automatically & provides translations, for some videos they don't add it for some reason unfortunately
@nihat0
@nihat0 10 ай бұрын
Your contents are very precious and unique
@ProgramWithGio
@ProgramWithGio 10 ай бұрын
Thank you 💙
@prajwalsiwakoti9866
@prajwalsiwakoti9866 2 жыл бұрын
so much information. Thank you, Gio. Looks like u have mastered the language😀
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Thank you 💙
@maneasema7272
@maneasema7272 2 жыл бұрын
It would be good if you use the same background color for both the editor and webpage.
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Why? I like contrast, having the same background for everything would get boring 🙂. Joke aside, I wouldn't want to waste time on CSS
@ינוןאלבז-כ1ז
@ינוןאלבז-כ1ז 2 жыл бұрын
Thank you so much for these informative and intelligible videos.
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
You're welcome 💙
@monsieurkeyboard
@monsieurkeyboard Жыл бұрын
This just had jsx vibes.. Loved it!!
@ProgramWithGio
@ProgramWithGio Жыл бұрын
💙💙
@alexbarut2066
@alexbarut2066 Жыл бұрын
why subtitles doesn't exist in this video ?
@ProgramWithGio
@ProgramWithGio Жыл бұрын
Sometimes KZbin doesn't add subtitles, idk why.
@coffeeandtalk
@coffeeandtalk Жыл бұрын
man you should have one million followers
@ProgramWithGio
@ProgramWithGio Жыл бұрын
I wish heh, thank you 🙌
@jpbehrens7061
@jpbehrens7061 3 жыл бұрын
Every day I learn some new cool thing from your tutorial ❤️ you are amazing 🤩
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
Glad to hear that, thank you 🙏
@omaryahia
@omaryahia Жыл бұрын
for me you are better than the documentation , really amazing thank you
@ProgramWithGio
@ProgramWithGio Жыл бұрын
Thank you 🙌
@EducacionCultura1992
@EducacionCultura1992 5 ай бұрын
you're really well at programing
@ProgramWithGio
@ProgramWithGio 5 ай бұрын
Thank you 🙌
@emekatimothyiloba699
@emekatimothyiloba699 Жыл бұрын
Great guy…thanks for this
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You're welcome 🙌
@GREENARROW-qo9eg
@GREENARROW-qo9eg 6 ай бұрын
i feel like the best for everyone.
@ProgramWithGio
@ProgramWithGio 6 ай бұрын
💙💙
@DeinlieblingsEmre
@DeinlieblingsEmre Жыл бұрын
very nice, thank you.
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You're welcome 🙌
@mehmetaydar_QXyGeN
@mehmetaydar_QXyGeN Жыл бұрын
You are the best teacher ♥
@ProgramWithGio
@ProgramWithGio Жыл бұрын
Thank you 🙌
@Chimponaut
@Chimponaut Жыл бұрын
This tutorial slaps.
@ProgramWithGio
@ProgramWithGio Жыл бұрын
🙌🙌
@alexandershnaidman8188
@alexandershnaidman8188 11 ай бұрын
Very interesting lesson
@ProgramWithGio
@ProgramWithGio 11 ай бұрын
Thanks for watching
@Vitalii-m6r
@Vitalii-m6r Жыл бұрын
Thanks for this clear explanation again!
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You're welcome
@ballpen9157
@ballpen9157 Жыл бұрын
great tut. thanks.
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You're welcome
@iqorimane3575
@iqorimane3575 Жыл бұрын
thank youu
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You're welcome
@hailsatan2712
@hailsatan2712 2 жыл бұрын
Thank you bro you are amazing 👍🏻
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Thank you 🙌💙
@memack101
@memack101 2 жыл бұрын
Thanks bro
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
💙
@AxxionMarketPlace-iu6ri
@AxxionMarketPlace-iu6ri Жыл бұрын
Thank you
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You're welcome
@ilya_123__
@ilya_123__ Жыл бұрын
thank you
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You're welcome
@markcuello5
@markcuello5 Жыл бұрын
SECURITY
@ProgramWithGio
@ProgramWithGio Жыл бұрын
🤔🤔?
@stefanbirsan3320
@stefanbirsan3320 3 жыл бұрын
the best!
@DesmondNettles
@DesmondNettles 11 ай бұрын
$name = $firstName . '$smack' . $lastName;
@ProgramWithGio
@ProgramWithGio 11 ай бұрын
?
@DesmondNettles
@DesmondNettles 11 ай бұрын
@@ProgramWithGio will Smith and Chris rock you coded $firstName = will and $lastName = smith
@ProgramWithGio
@ProgramWithGio 11 ай бұрын
Ahh 🤣🤣
@DesmondNettles
@DesmondNettles 11 ай бұрын
@@ProgramWithGio I enjoy your teaching
@ProgramWithGio
@ProgramWithGio 11 ай бұрын
@@DesmondNettles glad to hear, thank you 💙
@sunilkmcharde
@sunilkmcharde 2 жыл бұрын
Another great and useful video
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Thank you 💙
@leftoverture1976
@leftoverture1976 2 жыл бұрын
Helped me a lot! Thanks Gio!
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Glad to hear, thank you 🙌
@renuka_kulkarni
@renuka_kulkarni 2 жыл бұрын
Really helpful videos !!!
@ProgramWithGio
@ProgramWithGio 2 жыл бұрын
Glad to hear that!
@johongirrahimov2343
@johongirrahimov2343 3 жыл бұрын
Mix of Net Ninja and Traversy Media :)
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
Not sure what you mean but thank you if you think my content is at that level. I have a lot of respect for both Net Ninja & Traversy Media, have learned a lot of JS related stuff from their tutorials.
@johongirrahimov2343
@johongirrahimov2343 3 жыл бұрын
@@ProgramWithGio I mean new improved version of Net Ninja and Traversy Media in terms of Web development and explaining complex, in simple way. Man just keep doing, I'm sure that you'r gann hit 1million+ in the future
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
Wow, thank you. That means a lot to me. 🙏
@johongirrahimov2343
@johongirrahimov2343 3 жыл бұрын
@@ProgramWithGio You are welcome. You deserve it.
@nurulaminlimon4161
@nurulaminlimon4161 3 жыл бұрын
It really helps me a lot
@ProgramWithGio
@ProgramWithGio 3 жыл бұрын
Glad to hear that
@whisperscribe
@whisperscribe 5 ай бұрын
Best teacher ever.
@ProgramWithGio
@ProgramWithGio 4 ай бұрын
Thank you
@Islam.our.religion
@Islam.our.religion Жыл бұрын
Thx Gio for the video
@ProgramWithGio
@ProgramWithGio Жыл бұрын
You're welcome
PHP Null Data Type - Full PHP 8 Tutorial
3:29
Program With Gio
Рет қаралды 51 М.
规则,在门里生存,出来~死亡
00:33
落魄的王子
Рет қаралды 26 МЛН
Spongebob ate Patrick 😱 #meme #spongebob #gmod
00:15
Mr. LoLo
Рет қаралды 19 МЛН
小路飞嫁祸姐姐搞破坏 #路飞#海贼王
00:45
路飞与唐舞桐
Рет қаралды 7 МЛН
💩Поу и Поулина ☠️МОЧАТ 😖Хмурых Тварей?!
00:34
Ной Анимация
Рет қаралды 2 МЛН
5 JavaScript Concepts You HAVE TO KNOW
9:38
James Q Quick
Рет қаралды 1,4 МЛН
PHP - Encapsulation & Abstraction -  Full PHP 8 Tutorial
15:23
Program With Gio
Рет қаралды 31 М.
I built an app using a single index.php file, here's how it went
32:42
Andrew Schmelyun
Рет қаралды 62 М.
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,2 МЛН
PHP Integer Data type - Full PHP 8 Tutorial
4:51
Program With Gio
Рет қаралды 59 М.
Learn PHP: Heredoc syntax
5:33
Codecourse
Рет қаралды 27 М.
PHP Operators Part 1 - Full PHP 8 Tutorial
14:27
Program With Gio
Рет қаралды 56 М.
Just enough C to have fun
39:29
Kay Lack
Рет қаралды 49 М.
规则,在门里生存,出来~死亡
00:33
落魄的王子
Рет қаралды 26 МЛН