Skip to main content

🛍️ BLACK FRIDAY get-one-give-one sale is underway. Don't miss $50 off PLUS a free subscription to gift a friend. 🤩

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

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

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • 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
      • • Vibe Coding
  • Peter Allan
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Peter Allan
    Front End Web Development Techdegree Student 5,575 Points

    Social Icons

    Posted March 20, 2016 7:17pm by Peter Allan
    .a{fill-rule:evenodd;}techdegree
    Peter Allan
    Front End Web Development Techdegree Student 5,575 Points
    • PHP
    • PHP Basics (Retired)
    • PHP Conditionals & Loops
    • Foreach Loops

    1 Answer

  • Brendan Whiting
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Brendan Whiting
    Front End Web Development Techdegree Graduate 84,740 Points

    I'm confused about php script tags being opened and closed within a loop

    Posted November 23, 2015 2:41am by Brendan Whiting
    .a{fill-rule:evenodd;}techdegree seal-36
    Brendan Whiting
    Front End Web Development Techdegree Graduate 84,740 Points
    • PHP
    • PHP Basics (Retired)
    • PHP Conditionals & Loops
    • Foreach Loops

    6 Answers

  • Xing Li
    Xing Li
    2,112 Points

    why is there the only "}" includes in <?php ?>

    Posted September 7, 2015 9:28pm by Xing Li
    Xing Li
    2,112 Points
    • PHP
    • PHP Basics (Retired)
    • PHP Conditionals & Loops
    • Foreach Loops

    3 Answers

  • Brian Platt
    Brian Platt
    5,009 Points

    Loops in real life

    Posted June 27, 2015 4:53pm by Brian Platt
    Brian Platt
    5,009 Points
    • PHP
    • PHP Basics (Retired)
    • PHP Conditionals & Loops
    • Foreach Loops

    1 Answer

  • alexvalladares
    alexvalladares
    21,478 Points

    This can be made also via jQuery or JavaScript

    Posted April 28, 2015 11:42am by alexvalladares
    alexvalladares
    21,478 Points
    • PHP
    • PHP Basics (Retired)
    • PHP Conditionals & Loops
    • Foreach Loops

    2 Answers

  • Janos Antal
    Janos Antal
    1,451 Points

    php in .html and vice-versa, how?

    Posted March 30, 2015 10:30am by Janos Antal
    Janos Antal
    1,451 Points
    • PHP
    • PHP Basics (Retired)
    • PHP Conditionals & Loops
    • Foreach Loops

    2 Answers

  • Joseph Casey
    Joseph Casey
    6,782 Points

    A source covered in <?php?> seems awful impractical.

    Posted March 27, 2015 4:14am by Joseph Casey
    Joseph Casey
    6,782 Points
    • PHP
    • PHP Basics (Retired)
    • PHP Conditionals & Loops
    • Foreach Loops

    2 Answers

  • Randall Zepeda
    Randall Zepeda
    1,979 Points

    foreach loops completely lost

    Posted March 7, 2015 8:40pm by Randall Zepeda
    Randall Zepeda
    1,979 Points
    • PHP
    • PHP Basics (Retired)
    • PHP Conditionals & Loops
    • Foreach Loops

    8 Answers

  • adrien kovanic
    adrien kovanic
    5,727 Points

    hi, I wonder ; in those icones (facebook, twitter.) where are the external links to the sites?

    Posted February 28, 2015 9:45am by adrien kovanic
    adrien kovanic
    5,727 Points
    • PHP
    • PHP Basics (Retired)
    • PHP Conditionals & Loops
    • Foreach Loops

    3 Answers

  • orange sky
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    orange sky
    Front End Web Development Techdegree Student 4,945 Points

    For each()

    Posted January 17, 2015 10:48am by orange sky
    .a{fill-rule:evenodd;}techdegree
    orange sky
    Front End Web Development Techdegree Student 4,945 Points
    • PHP
    • PHP Basics (Retired)
    • PHP Conditionals & Loops
    • Foreach Loops

    2 Answers

  • Nick Woodland
    Nick Woodland
    13,870 Points

    Why is the <li> tag kept outside the php tags?

    Posted November 4, 2014 7:02pm by Nick Woodland
    Nick Woodland
    13,870 Points
    • PHP
    • PHP Basics (Retired)
    • PHP Conditionals & Loops
    • Foreach Loops

    2 Answers

  • Steve Berrill
    Steve Berrill
    20,016 Points

    How can I also loop through the href for different social links in each list?

    Posted September 7, 2014 7:02pm by Steve Berrill
    Steve Berrill
    20,016 Points
    • PHP
    • PHP Basics (Retired)
    • PHP Conditionals & Loops
    • Foreach Loops

    5 Answers

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

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

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

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord