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!
let me foreach myself……………..
wow this is useful for making calendar
for each elements of $test is treated as $x (one at a time starting from the 1st) and echoed.
Great video!
I love the foreach loop :p
thank you very much for this useful tutorial
Waled
CHECK OUT MY CHANEL TO LEARN HOW TO LEARN IT IN ABOUT 17 HOURS
like the enhanced for loop in java ! thanks bucky
Thank you so much…
Usefull for making websites 🙂
Genius. – BehindVFX
Genius. – BehindVFX
Genius. – BehindVFX
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.
nice
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 was thinking the same thing.
What is the reason you get arrayarrayarray when you do: echo $test;?
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.
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.
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.
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!
Can somebody tell me for what usefull think I can use that “foreach” because I don’t find sence in it
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? 🙂