PHP Tutorial (& MySQL) #13 - Functions

preview_player
Показать описание
Hey gang, in this PHP tutorial I want to introduce you to the concept of functions. Functions are an important part of pretty much every programming language, and allow us to create callable blocks of code that can be re-used.

----------------------------------------

🐱‍💻 🐱‍💻 Course Links:

🤑🤑 Donate


🎓🎓 Find me on Udemy

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

WARNING: this channel videos are highly addictive, and anybody who watches them will become a lifelong subscriber!

RameenFallschirmjager
Автор

Hello Mr.Ninja,
I am an old student, I watched +35 playlists on your channel for 2 years (I'm now 16 :P), and I worked on myself with that knowledge.
So I wanted to thank you very much for that, words can't even describe it. :)
Keep Going Forward Our Master!

PS: I hope there'll be Laravel playlist and Electron.js too as soon as you can, Best Wishes!

nasrallahal-shaer
Автор

i love the way you explain. you make it so easy to understand, i learned alot, so thank you very much.

sarbjotkang
Автор

Amazing. In previous tutorial I also learned {} to use in echo. That was something I did not know why my command was not working.

fahrifoxtrot-whiskey
Автор

Awesome tutorial Shaun, Thank you so much Shaun! :) 👍👍👍

atishmhatre
Автор

Awesome.. Keep the spirit going Ninja!

chukwuebukaaneke
Автор

Hey Shaun, can you make a complete Electron js course please ?
Please make it right after this series, will you ?
There's no good complete electron js tutorial series in YouTube.
Ninjas are waiting...

jishnuraj
Автор

Awesome...you made me understand functions so simple....do you have a video with real world usage of functions?

kingsleynmai
Автор

This explanation is just another level bro
Have admit your efforts 🙌

jahideljah
Автор

At 8:00 if you decided to concatenate the variables would this be correct?

echo "{$product['name']}" . " costs £ {$product['price']}" . " to buy <br />";

Martin
Автор

What is the schudule for these videos, because one day you post 1 video, the next 2 and some days nothing. I think i will come back to these videos in a month or so.

yamacode
Автор

So, I've been (slowly) going through this, learning PHP, and so far it's been a really good tutorial. However, as an American, I went to use the dollar sign instead of the pound sign on my cost. It took me several minutes to figure out why my code was breaking - despite the fact that the $ was outside of the command (echo "{$product['name']} costs ${$product['price']} to buy <br />";), PHP didn't like it. I had to change the costs $ to costs L. This seems like an issue in countries that use the dollar sign.

aimeechild
Автор

Many thanks but it seems my PHP function code does not work when it is called
formatProduct(['name' => 'pancake', 'price' => 3]); like this and
the error shows Parse error: syntax error, unexpected '[', expecting ')' in necessary to show behind I think)
I am using WampServer so is it because of my server?

phupwintkhine
Автор

At 5:05, I got the output as "Goodmorning $name" instead of "Goodmorning mario".
The code should be something like this: function sayHello($name) { echo 'Goodmorning ' . $name; }
instead of, function sayHello($name) { echo 'Goodmorning $name' ; }

mohammedzaid
Автор

Am I the only one who echoed "say hello to my little friend!!!"; // ? 😛

RadeonVector