Don't forget to gift yourself this Cyber Monday 👀 Get a year of Courses for $150 (40% off!)

Dive into new course Game Development with Phaser 👾

New AI course: Introduction to Computer Vision 💻

💥 ALL NEW: Code Adventures! ⚡ Dare to embark on a front end coding adventure 🌟

Get job-ready with our Career Toolbox Track's career advice, resume tips, and more 🧰

🤖 Check out all our AI content here 👀

Learn about our new Community Discord server here and join us on Discord here!

Students: got a cool project or resource to share? Submit it to Treehouse Links! 🤩

  • Home
  • Free Trial
  • Sign In
  • Plans
  • Tracks
  • Library
  • Community
  • Code Adventures
  • Support
  • Jobs
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • 21st Century Skills
      • • AI
      • • Android
      • • APIs
      • • Business
      • • C#
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Equity, Diversity, and Inclusion (EDI)
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • PHP
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
  • 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,281 Points

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

    Posted December 30, 2018 2:38pm by nathan goel
    nathan goel
    7,281 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,250 Points

    PHP: Ping Pong Simulation Game

    Posted September 3, 2016 12:18pm by Jonathan Grieve
    Jonathan Grieve
    Treehouse Moderator 91,250 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
  • Perks
  • Public Library Access
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2023 Treehouse Island, Inc.