I would think it’s pretty confusing to the viewer that you keep switching from using single ‘ marks from quotation ” marks. I don’t know PHP very well, but I’m assuming they are some-what interchangeable. The viewer may not though.
I’m unsure on how to structure a code correctly to give a command within my WHILE loop after executing an IF statement, can you take a look at this thread i posted? tinyurl [dot] com/y8e8jod thank you
I don’t understand the significance of $x in PHP as when I change my variable letter to anything other than x it won’t display so i figure $x is something special in PHP?
I agree. If you are going to teach, you need to teach proper syntax. It’s the equivalent to a biology teacher leaving out connective tissue, an english teacher leaving out periods and a math teacher leaving out parentheses that are necessary to solve a problem in the correct order. It would also be useful to explain why a foreach statement is useful in a real world application, because your example doesn’t give the foreach statement the merit it deserves.
well that was abit of a mysterious tutorial as the webpage readout for your code was three. so $x was just the last element of the array, i didnt understand why! thanks no worries i will find out with 5 mins of reading!
hammadghulam says
let me foreach myself……………..
HawxTeamDelta says
wow this is useful for making calendar
keirnus says
for each elements of $test is treated as $x (one at a time starting from the 1st) and echoed.
TheEliseoReyes says
Great video!
COMMANO38 says
I love the foreach loop :p
nwas555 says
thank you very much for this useful tutorial
Waled
imwithswat says
CHECK OUT MY CHANEL TO LEARN HOW TO LEARN IT IN ABOUT 17 HOURS
hesham3540 says
like the enhanced for loop in java ! thanks bucky
coolcam262 says
Thank you so much…
TheRealAuxiliary says
Usefull for making websites 🙂
mangoprojects says
Genius. – BehindVFX
mangoprojects says
Genius. – BehindVFX
mangoprojects says
Genius. – BehindVFX
TheErroneousOne says
I would think it’s pretty confusing to the viewer that you keep switching from using single ‘ marks from quotation ” marks. I don’t know PHP very well, but I’m assuming they are some-what interchangeable. The viewer may not though.
cocodibani says
nice
cocodibani says
I’m unsure on how to structure a code correctly to give a command within my WHILE loop after executing an IF statement, can you take a look at this thread i posted? tinyurl [dot] com/y8e8jod thank you
larobertson04 says
I was thinking the same thing.
onnoman says
What is the reason you get arrayarrayarray when you do: echo $test;?
CL0udnyn3 says
I like Array_values as it offers a more complex and detailed view of the array but for a simple view the foreach and for loops you showed work.
CL0udnyn3 says
I don’t understand the significance of $x in PHP as when I change my variable letter to anything other than x it won’t display so i figure $x is something special in PHP?
iamtheeskimofriend says
I agree. If you are going to teach, you need to teach proper syntax. It’s the equivalent to a biology teacher leaving out connective tissue, an english teacher leaving out periods and a math teacher leaving out parentheses that are necessary to solve a problem in the correct order. It would also be useful to explain why a foreach statement is useful in a real world application, because your example doesn’t give the foreach statement the merit it deserves.
iamtheeskimofriend says
Imagine you have a database where there are a LOT more values (hundreds or thousands) it’s far less complicated to type than the for statement.
zimant78 says
well that was abit of a mysterious tutorial as the webpage readout for your code was three. so $x was just the last element of the array, i didnt understand why! thanks no worries i will find out with 5 mins of reading!
r3sp3c791 says
Can somebody tell me for what usefull think I can use that “foreach” because I don’t find sence in it
mKornelius says
Yeah, very nice work there.
All ready learned alot. And will continue watching your video’s. And hopefully you will keep up the good work? 🙂