🤑 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
    • 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
  • 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
  • Sinead KACHROO
    Sinead KACHROO
    277 Points

    how can we have an if statement with no condition? If just says if ($username) ?

    Posted April 13, 2020 7:47pm by Sinead KACHROO
    Sinead KACHROO
    277 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    1 Answer

  • Simone Dudley
    Simone Dudley
    3,291 Points

    Don't understand question: var_dump(5 <> 6);

    Posted February 5, 2020 8:06am by Simone Dudley
    Simone Dudley
    3,291 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    1 Answer

  • tristan marroquin
    tristan marroquin
    2,491 Points

    Can you explain to me more on why nothing will be displayed is it because if ($username) at the start is false?

    Posted February 10, 2019 9:47am by tristan marroquin
    tristan marroquin
    2,491 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    1 Answer

  • Lee Stoka
    Lee Stoka
    1,104 Points

    Please explain the code snippet to me

    Posted December 12, 2018 11:22pm by Lee Stoka
    Lee Stoka
    1,104 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    1 Answer

  • Chadwick Savage
    Chadwick Savage
    11,919 Points

    PHP Arrays and Control Structures Quiz - I am in the conditionals quiz and am unsure why my answer is wrong.

    Posted July 6, 2018 2:34pm by Chadwick Savage
    Chadwick Savage
    11,919 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    2 Answers

  • john paul
    john paul
    3,191 Points

    quiz question

    Posted February 23, 2018 10:20am by john paul
    john paul
    3,191 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    1 Answer

  • Anna T
    Anna T
    13,066 Points

    I don't understand the answer to this one...

    Posted January 30, 2018 8:15pm by Anna T
    Anna T
    13,066 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    1 Answer

  • Jakob Tolstrup
    Jakob Tolstrup
    1,623 Points

    If ($username) is what?

    Posted December 4, 2017 12:51pm by Jakob Tolstrup
    Jakob Tolstrup
    1,623 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    1 Answer

  • Teacher Russell
    Teacher Russell
    16,873 Points

    The username is set, so the first conditional evaluates to true.

    Posted November 8, 2017 3:39am by Teacher Russell
    Teacher Russell
    16,873 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    1 Answer

  • Arikaturika Tumojenko
    Arikaturika Tumojenko
    8,897 Points

    Can someone explain the code step by step?

    Posted November 5, 2017 8:12pm by Arikaturika Tumojenko
    Arikaturika Tumojenko
    8,897 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    3 Answers

  • Charles Gooderham
    Charles Gooderham
    4,053 Points

    Why is the answer 'nothing is displayed'?

    Posted October 19, 2017 11:48am by Charles Gooderham
    Charles Gooderham
    4,053 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    1 Answer

  • mayank arora
    mayank arora
    523 Points

    Can you explain this to me.

    Posted July 6, 2017 5:24pm by mayank arora
    mayank arora
    523 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    1 Answer

  • Chris Seals
    Chris Seals
    4,507 Points

    The struggle is real

    Posted June 22, 2017 8:28pm by Chris Seals
    Chris Seals
    4,507 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    3 Answers

  • Chris Seals
    Chris Seals
    4,507 Points

    Nesting statement help.

    Posted June 22, 2017 8:11pm by Chris Seals
    Chris Seals
    4,507 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    1 Answer

  • James Coles
    James Coles
    2,449 Points

    Conditionals Confused

    Posted May 15, 2017 12:08pm by James Coles
    James Coles
    2,449 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    1 Answer

  • Beth Griffith
    Beth Griffith
    4,533 Points

    Can someone help me break down this code? Why is the answer, nothing will happen?

    Posted May 15, 2017 2:33am by Beth Griffith
    Beth Griffith
    4,533 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    2 Answers

  • omer cohen
    omer cohen
    2,549 Points

    Wow i realy need the translation to this code

    Posted April 19, 2017 9:00am by omer cohen
    omer cohen
    2,549 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    1 Answer

  • omer cohen
    omer cohen
    2,549 Points

    need help with it ?

    Posted April 19, 2017 6:50am by omer cohen
    omer cohen
    2,549 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    2 Answers

  • dominick lucero
    dominick lucero
    788 Points

    Can someone please explain to me why this answer is "nothing is displayed" as opposed to "you must be logged in"?

    Posted January 25, 2017 5:34pm by dominick lucero
    dominick lucero
    788 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    1 Answer

  • Cindi Harris
    Cindi Harris
    3,702 Points

    Could i please get an explanation of this problem?

    Posted January 16, 2017 9:30pm by Cindi Harris
    Cindi Harris
    3,702 Points
    • PHP
    • PHP Arrays and Control Structures
    • PHP Conditionals
    • Conditionals

    1 Answer

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.