[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
Beginner PHP Tutorial – 25 – while Loop
by
Tags:
Comments
36 responses to “Beginner PHP Tutorial – 25 – while Loop”
-
not that bad tutorial.
-
<?php
$counter = 1;
while ($counter <= 4) {
echo $counter . '. ' . 'nothings wrong with me<br>';
$counter++;
}?>
-
Why he put dot after $counter
-
175 more.. 😐
-
great man
-
I hate watching the tree house add!
-
finally knew how to make raws
-
175 to go
-
WOW, i wrote this code without thinking:
$i = 0;
while (10 + 10 == 20) {
$i++;
echo $i;
}
DON'T TRY IT! it will crash your browser 😛 -
wouldn't this work just as well with an if statement?
-
I don't understand why adding $counter. added numbers.
-
if("why loops?" === "whileloops")
echo 'its cool to have a british teacher!'; -
Personally I believe these videos go WAY to in depth. These videos are still for someone who's never been around programming. I paused the video at 0:56 then created a while loop. The takes a variable called number with the value of 100 and Echos the number then subtracts one and repeats until the number is at 0. On to the next video
-
Thank u very much bucky sir……….
-
wavy loops….i liked that lesson today!!! ;p
-
And if you want to put periods after the numbers, do this.
echo $counter. '.'. ' Hello -
if the $counter++ is after echo$counter it works fine as it's supposed to. but if that is reversed it shows as 11 hello. if counter is 11 why does it run?
-
Did u do that like that:?
$counter = 1
while ($counter<=10)
echo $counter . [a space]Hello[br]
$counter++ -
ps. i had to remove the curly brackets..it wasn't posting
-
If I run the piece of code like this, at the last hello, it shows as 11Hello. So why is the loop still running if $counter = 11 at that point?
while ($counter <= 10)
$counter ++;
echo $counter.'Hello'; -
Pre-incrementing (++$var) is generally quicker than post incrementing ($var++) as far as I know. It's a good habit to use pre, especially in loops.
Anyway, good tutorials 🙂 -
gotta love Alex's accent. It's so classy.
-
i find myself speaking in a british accent practising this shit
-
I have been trying to learn php for years. Books, websites, vids, all too confusing and boring. But Bucky and Alex made it hit home for me. So, Bucky and Alex "keep doing you!" and don't let any negativity stop you from spreading knowledge. Colleges would just love for you to stop doing what you do so they can charge more for in my opinion not as good training. I don't know if you have another series of tutorials but I will be looking for them as soon as I finish this one. Keep up the good work.
-
I wish you would have showed it crash the page with an infinite amount of "Hello"! BTW congratulations on getting an A.D.D. person to sit through an eighth of your videos!
-
Same Thing described by BUCKY in Java Programming Tutorial 13-while loop.. Just remember That…
-
hahaha lol
-
The basics in every language are logically similar, just small differences in syntax. The only difference I see is that PHP isn't a full object oriented language like Java/C, but I like some of the frameworks like RoR and CakePHP.
-
This is one of the tutorials I will probably revisit a couple of times to get it stuck in my brain.
-
PHP and HTML are 2 separate things. HTML is purely for mark-up or in a sense, how the page be structured as for PHP, it allows you to create your page dynamically by connecting it to a DB or a server
-
in HTML you can't do any logic, connect to databases, or store information given by a user.
-
What is the advantage to using PHP over HTML?
-
Better to be overeducated than undereducated!
-
LOL you can't fail more than you did 😀 Correct condition would be : while (tutorialLasts) { keep watching and learning }
-
I put my web server to the test with while (1) and i had no crashing. YEAH!
-
People learn at different rates. If you get it you can move on to the next tutorial.
Also, why does it matter that he is British. Go troll somewhere else.
Leave a Reply