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
  • Ker Sing Tan
    Ker Sing Tan
    10,573 Points

    You dont need to store the function inside a variable?

    Posted February 7, 2020 5:41am by Ker Sing Tan
    Ker Sing Tan
    10,573 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • Returning Values

    1 Answer

  • A X
    A X
    12,842 Points

    Why do we need an array to return multiple values & why can't we use multiple variables to achieve the same results?

    Posted February 19, 2017 2:44am by A X
    A X
    12,842 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • Returning Values

    3 Answers

  • A X
    A X
    12,842 Points

    Why can't we echo a function & why can we only echo a variable?

    Posted February 19, 2017 2:43am by A X
    A X
    12,842 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • Returning Values

    2 Answers

  • Miguel Nunez
    Miguel Nunez
    3,266 Points

    What is it meant when coders say this about print_r in php?

    Posted September 5, 2016 9:34am by Miguel Nunez
    Miguel Nunez
    3,266 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • Returning Values

    1 Answer

  • Miguel Nunez
    Miguel Nunez
    3,266 Points

    What is a language construct in simplicity in php with out using big fancy words.?

    Posted September 5, 2016 3:51am by Miguel Nunez
    Miguel Nunez
    3,266 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • Returning Values

    0 Answers

  • Miguel Nunez
    Miguel Nunez
    3,266 Points

    What's the difference between an echo and a return.?

    Posted September 3, 2016 9:29am by Miguel Nunez
    Miguel Nunez
    3,266 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • Returning Values

    0 Answers

  • Miguel Nunez
    Miguel Nunez
    3,266 Points

    Why is it so hard for people to explain what a return means in php in simple terms?

    Posted September 1, 2016 8:31am by Miguel Nunez
    Miguel Nunez
    3,266 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • Returning Values

    3 Answers

  • Miguel Nunez
    Miguel Nunez
    3,266 Points

    What it return in php functions?

    Posted September 1, 2016 5:59am by Miguel Nunez
    Miguel Nunez
    3,266 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • Returning Values

    4 Answers

  • Fabian Pijpers
    PLUS
    Fabian Pijpers
    Courses Plus Student 41,372 Points

    Problems with workspaces functioning properly. My comment is when using the preview functions My html php output 6

    Posted February 7, 2016 10:31am by Fabian Pijpers
    Fabian Pijpers
    Courses Plus Student 41,372 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • Returning Values

    1 Answer

  • Xing Li
    Xing Li
    2,112 Points

    what's the difference between echo and return??

    Posted September 7, 2015 11:46pm by Xing Li
    Xing Li
    2,112 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • Returning Values

    3 Answers

  • Omer Asadullah
    Omer Asadullah
    10,415 Points

    Returning Values - Need explanation in comprehensive language

    Posted May 9, 2015 9:31pm by Omer Asadullah
    Omer Asadullah
    10,415 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • Returning Values

    4 Answers

  • shaunboleh
    shaunboleh
    14,970 Points

    return statements, how many

    Posted March 27, 2015 1:11am by shaunboleh
    shaunboleh
    14,970 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • Returning Values

    3 Answers

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

    print_r

    Posted February 13, 2015 7:28am by orange sky
    .a{fill-rule:evenodd;}techdegree
    orange sky
    Front End Web Development Techdegree Student 4,945 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • Returning Values

    3 Answers

  • Tawny Bartlett
    Tawny Bartlett
    24,674 Points

    Best practice with php functions... is it best to use return or echo?

    Posted January 9, 2015 3:29pm by Tawny Bartlett
    Tawny Bartlett
    24,674 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • Returning Values

    1 Answer

  • Ezra John Alvarez
    Ezra John Alvarez
    557 Points

    When is the right time to use return vs echo?

    Posted December 23, 2014 8:07am by Ezra John Alvarez
    Ezra John Alvarez
    557 Points
    • PHP
    • PHP Functions
    • Function Returns and More
    • Returning Values

    3 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