4: How to Create PHP Variables | PHP Tutorial | Learn PHP Programming | PHP for Beginners

How to Create PHP Variables | PHP Tutorial | Learn PHP Programming | PHP for Beginners. In this PHP tutorial you will learn about variables which are used to save data in PHP.

In this episode we will learn about “variables” which is something we use frequently in almost everything we create using PHP.
The basic idea of variables, is that we can save/store data inside an “object” to make it easier to access later in our code. As well as naming the data we have in our code in a manner which makes sense, and is consistant throughout all our code.


First of all, thank you for all the support you have given me!

I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!

I am now using Patreon to share improved and updated lesson material, and for a small fee you can access all the material. I have worked hard, and done my best to help you understand what I teach.

I hope you will find it helpful 🙂

Material for this lesson: https://www.patreon.com/posts/php-4-download-15606472


Ivelin Ivanov says:

Awesome. You’re showing cool stuff. 🙂

Balthazar says:

What a wonderful source of information you are! Thank you for the wonderful videos, they are really useful!

Clash Royal fan says:

can you please give me any of the projects in web devlopment

Recommendations says:

at 6:24, why did you use D drive for the xampp and not the C drive? what’s the different? thank you in advance!

mahim chaudhry says:

editor which u r using here?????????????????????????plzz tello

tralay520 says:

definitely!!!!!!!!!!!!! the best!!!!!!!!! you explain everything like I’ve never coded before and don’t understand why those little things need to be done, which is exactly what i’ve needed…..everyone else has been coding for so long that they forget what its like to struggle in the beginning, you have helped me jump that gap that i was getting stuck at.

Jean Simas says:

Anybody here knows why my variables does not have a different color?

Merv says:

What is the difference between input type=”submit” value=”submit” and buttons?

Super Man says:

Thank you so mach

Islam Account 2 says:

why do we but ” _ ” this Before type GET ?
what does this mean ?

Ajmal Khan says:

Excellent Video

Kinyera Denis says:

awesome tutorial. thanks.

which text editor is that?

Funky Attitude says:

5:19 Kappa

Joan Ricart says:

Hi Daniel! Thanks for making these. Also I noticed from other vids that you’re into gaming, I’d love to play some games with you! My steam id: Yuhhans.

Chris Valiente says:

New sub. I get the feeling your videos are going to help me achieve starting my Web Agency by July.

Bärenmarke says:

You got a real talent to teach simply

Balochi Videos says:

I love you Denial . I learned lots of programming form you. your awesome

Debjyoti Roy says:

I also searched a lot of tutorials of PHP and MySQL.
No doubts yours are the best!
Thank you so much sir. Love from India

John Rey Diocson says:

Thanks a lot..

Mommotexx says:

5:19 Question mark*

Love your videos. Du er flink til å lære bort 🙂

Papacle Kameeta says:

what is the shortcut to starting a html5?

Ramon Fernandez says:

Good stuff. Only 4 videos in and already getting into the juicy material. Concise and clear, yet thorough. Added bonus that your voice isn’t annoying.

Definitely earned a new subscriber here and I’ll be finishing out your tutorial.

Andy Chen says:

Thank you

伍偉豪 says:


George Ionut Musat says:

Hi, Please tell me what editor you are using.
I try dreamweaver, and it doesn’t color code objects, and that bugs me allot!
I know it shouldn’t, but it does…

Rahul Das says:

Hi mmtuts, I know this is not important but your sublime variable is green color but my sublime text editor variable color by default white do you install any package for it thanks….

Genuis Brain says:

lol who told you that you are hansom

Sumaira Noor says:

nice tutorials..
great help..
thank u so much sir.

Prim says:


birdman says:

Nice work, Mr. mmtuts! Thank you for making this available:)

Manisha Rinni says:

Sir, I love you. You are the best.

Alex Costa says:

you are the best thank you a lot.

ARV says:

No doubt you’re by far the best!!
Need help I’m using sublime text as well but it doesn’t recognises the $ variable please help..

And thank you for the video they help a lot

Kitchen Recipe says:

Thank you so much for this vedio 🙂

tralay520 says:

the “form” isn’t working for me because it is saying that it is a syntax error

Hashim Puthiyakath says:

your tutorials are very easy to understand. You give a conceptual clarity to every subject you teach and answer all possible doubts we may have.

by the way, the example you showed was really useful. It would be great if you follow that method in every videos.

I have a request. If you show real examples of what you are going to do or achieve in each video, it would be a great help. By real examples I mean examples from the web.

Mohamed Abd El Ghaffar says:

You are the best Daniel…. Keep it up Please

Funky Attitude says:

Great man you are 🙂

Enis Gusinac says:

I just want to confirm this statement !!!!
< ?php Echo "" I've searched a lot of tutorials of PHP and MySQL. No doubts yours are the best! Thank you so much." ?>

Medoo says:

Im avoiding my workouts for this :3, hopefully i’ll get something out of this. Thanks for tutorials by the way.^^

深海鱼 says:

if this php lesson use chinese, i’ll be happy

AB says:


ruffneck718 says:

Great content, you teach very well.

Skyron98 says:

can someone tell me what color scheme is he using?

mark anthony cua says:

I need help, please. I’ve typed exactly what is showing on this video but it seems that sublime is not recognizing the codes. here’s the screenshot: http://prntscr.com/i4hj83

ROMANTIC SCENTS (Bath ♥ Body ♥ Soaps) says:

Nice! Thank you again!

Csaba Tamás Sáfrány says:

No doubt, you jumped a little bit forward in the course material. But it was totally worth it! I love it that you explain complex stuff so understandably.

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!