Beginner PHP Tutorial – 25 – while Loop

[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –


Posted

in

by

Tags:

Comments

36 responses to “Beginner PHP Tutorial – 25 – while Loop”

  1. Rohan Mahajan Avatar

    not that bad tutorial.

  2. Madison Bratescu Avatar

    <?php

    $counter = 1;

    while ($counter <= 4) {

    echo $counter . '. ' . 'nothings wrong with me<br>';
    $counter++;
    }

    ?>

  3. Miloš Petrović Avatar

    Why he put dot after $counter

  4. Zippen Avatar

    175 more.. 😐

  5. Talal Bad Avatar

    I hate watching the tree house add!

  6. Ahmed Okasha Avatar

    finally knew how to make raws

  7. Tutorial Nom Avatar

    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 😛

  8. Redneck Rebel aka raregoodguy Avatar

    wouldn't this work just as well with an if statement?

  9. Rob Hawkins Avatar

    I don't understand why adding $counter. added numbers.

  10. Monkey D. Luffy Avatar

    if("why loops?" === "whileloops")
    echo 'its cool to have a british teacher!';

  11. Moby - Avatar

    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

  12. Manoj Mahato Avatar

    Thank u very much bucky sir……….

  13. Alexis Papadopoulos Avatar

    wavy loops….i liked that lesson today!!! ;p

  14. PunkITechs Avatar

    And if you want to put periods after the numbers, do this.
    echo $counter. '.'. ' Hello

  15. Ausamnco Avatar

    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?

  16. Bishco Avatar

    Did u do that like that:?
    $counter = 1
    while ($counter<=10)
    echo $counter . [a space]Hello[br]
    $counter++

  17. Ausamnco Avatar

    ps. i had to remove the curly brackets..it wasn't posting

  18. Ausamnco Avatar

    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';

  19. Mieljean Avatar

    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 🙂

  20. Mr. Neko Avatar

    gotta love Alex's accent. It's so classy.

  21. c4stoners Avatar

    i find myself speaking in a british accent practising this shit

  22. Ebonygeek45 Avatar

    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.

  23. RandomlyEssential Avatar

    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!

  24. HaxorHzn Avatar

    Same Thing described by BUCKY in Java Programming Tutorial 13-while loop.. Just remember That…

  25. Jonathan Hilfiker Avatar

    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.

  26. lookintothesky123 Avatar

    This is one of the tutorials I will probably revisit a couple of times to get it stuck in my brain.

  27. Joross Barredo Avatar

    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

  28. Andrew Marks Avatar

    in HTML you can't do any logic, connect to databases, or store information given by a user.

  29. tkdspirit76 Avatar

    What is the advantage to using PHP over HTML?

  30. Jackson Roberts Avatar

    Better to be overeducated than undereducated!

  31. Novica Vukobratovic Avatar

    LOL you can't fail more than you did 😀 Correct condition would be : while (tutorialLasts) { keep watching and learning }

  32. AwesomeVideos300 Avatar

    I put my web server to the test with while (1) and i had no crashing. YEAH!

  33. AwesomeVideos300 Avatar

    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

Your email address will not be published. Required fields are marked *