🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Community Projects
    • Live Sessions
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Community Projects Live Sessions Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • Robert Bourton
    Robert Bourton
    4,751 Points

    Why the new line when its in the browser?

    Posted July 2, 2024 10:57pm by Robert Bourton
    Robert Bourton
    4,751 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Loops
    • Ping Pong

    3 Answers

  • Carlos Zuluaga
    Carlos Zuluaga
    21,184 Points

    The value echo for the final rounds taken always brings 0 (initial value)

    Posted January 1, 2023 6:46pm by Carlos Zuluaga
    Carlos Zuluaga
    21,184 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Loops
    • Ping Pong

    2 Answers

  • Anastasia Khmelevskaya
    Anastasia Khmelevskaya
    1,775 Points

    Syntax error although I wrote the code exactly as in the video

    Posted January 11, 2021 9:33pm by Anastasia Khmelevskaya
    Anastasia Khmelevskaya
    1,775 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Loops
    • Ping Pong

    2 Answers

  • Door Man
    Door Man
    1,711 Points

    each() being deprecated.

    Posted June 10, 2020 4:09pm by Door Man
    Door Man
    1,711 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Loops
    • Ping Pong

    2 Answers

  • yahya alhalki
    yahya alhalki
    1,149 Points

    why do we have to put parentheses round ($player1 < 11 && $player2 < 11) )?

    Posted May 2, 2019 6:42am by yahya alhalki
    yahya alhalki
    1,149 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Loops
    • Ping Pong

    2 Answers

  • Alexei Parphyonov
    Alexei Parphyonov
    34,128 Points

    Wrong number of rounds in the video though the same code works correct on my Mac

    Posted January 13, 2019 9:56am by Alexei Parphyonov
    Alexei Parphyonov
    34,128 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Loops
    • Ping Pong

    1 Answer

  • nathan goel
    nathan goel
    7,410 Points

    I guess I don't really understand && and ||...help please

    Posted December 30, 2018 2:38pm by nathan goel
    nathan goel
    7,410 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Loops
    • Ping Pong

    1 Answer

  • Yoel Dovid Cohen
    Yoel Dovid Cohen
    13,405 Points

    Workspaces Not working

    Posted December 25, 2018 7:04pm by Yoel Dovid Cohen
    Yoel Dovid Cohen
    13,405 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Loops
    • Ping Pong

    1 Answer

  • Emil Pesaxov
    Emil Pesaxov
    3,684 Points

    Cannot understand the while loop code.

    Posted July 4, 2018 3:24pm by Emil Pesaxov
    Emil Pesaxov
    3,684 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Loops
    • Ping Pong

    1 Answer

  • Waqar Mohammad
    Waqar Mohammad
    2,914 Points

    The rules of the game state to win a round you need 11 as a minimum score, but the output is not requiring that.

    Posted October 31, 2016 2:42pm by Waqar Mohammad
    Waqar Mohammad
    2,914 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Loops
    • Ping Pong

    3 Answers

  • Jonathan Grieve
    MOD
    Jonathan Grieve
    Treehouse Moderator 91,254 Points

    PHP: Ping Pong Simulation Game

    Posted September 3, 2016 12:18pm by Jonathan Grieve
    Jonathan Grieve
    Treehouse Moderator 91,254 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Loops
    • Ping Pong

    1 Answer

  • Aaron Coursolle
    Aaron Coursolle
    18,014 Points

    Very minor error in video...

    Posted August 18, 2016 2:27pm by Aaron Coursolle
    Aaron Coursolle
    18,014 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Loops
    • Ping Pong

    0 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.