Skip to main content

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

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

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
  • Amy Hsieh
    Amy Hsieh
    6,023 Points

    Is print_info an internal function of PHP or a self-defined function by user?

    Posted July 9, 2019 12:35pm by Amy Hsieh
    Amy Hsieh
    6,023 Points
    • PHP
    • PHP Functions
    • PHP Internal Functions
    • PHP Array Functions

    1 Answer

  • Keith Miller
    Keith Miller
    2,310 Points

    My code is only returning one name, Hampton. What am I missing?

    Posted September 11, 2018 12:57am by Keith Miller
    Keith Miller
    2,310 Points
    • PHP
    • PHP Functions
    • PHP Internal Functions
    • PHP Array Functions

    2 Answers

  • Siraj Khan
    Siraj Khan
    3,451 Points

    Why does `function print_info($key,$value){ echo "$key is a $value.<br>"; }` print : "Frog is Mike" .??

    Posted June 6, 2018 6:36pm by Siraj Khan
    Siraj Khan
    3,451 Points
    • PHP
    • PHP Functions
    • PHP Internal Functions
    • PHP Array Functions

    2 Answers

  • Amy Dollar
    Amy Dollar
    2,562 Points

    Am I the only one.......

    Posted November 27, 2017 2:24pm by Amy Dollar
    Amy Dollar
    2,562 Points
    • PHP
    • PHP Functions
    • PHP Internal Functions
    • PHP Array Functions

    2 Answers

  • yalın küçük
    yalın küçük
    4,810 Points

    array_combine method has a problem with doubled values. Then PHP as a language has a problem.

    Posted October 16, 2017 1:36am by yalın küçük
    yalın küçük
    4,810 Points
    • PHP
    • PHP Functions
    • PHP Internal Functions
    • PHP Array Functions

    5 Answers

  • John Silverstein
    John Silverstein
    6,290 Points

    why not use foreach instead of array_walk?

    Posted August 22, 2017 8:15pm by John Silverstein
    John Silverstein
    6,290 Points
    • PHP
    • PHP Functions
    • PHP Internal Functions
    • PHP Array Functions

    0 Answers

  • Scott Brown
    Scott Brown
    653 Points

    What to use <br> or \n ?

    Posted April 15, 2016 11:13pm by Scott Brown
    Scott Brown
    653 Points
    • PHP
    • PHP Functions
    • PHP Internal Functions
    • PHP Array Functions

    1 Answer

  • Bappy Golder
    Bappy Golder
    13,449 Points

    Why are we using a string version of the code?

    Posted November 21, 2015 3:25am by Bappy Golder
    Bappy Golder
    13,449 Points
    • PHP
    • PHP Functions
    • PHP Internal Functions
    • PHP Array Functions

    1 Answer

  • Bruno Dias
    Bruno Dias
    10,554 Points

    Why there are two variables at array_keys loop?

    Posted October 27, 2015 1:34pm by Bruno Dias
    Bruno Dias
    10,554 Points
    • PHP
    • PHP Functions
    • PHP Internal Functions
    • PHP Array Functions

    2 Answers

  • Georgina Pacey
    Georgina Pacey
    4,139 Points

    Preview is blank. array_walk

    Posted September 27, 2015 2:01pm by Georgina Pacey
    Georgina Pacey
    4,139 Points
    • PHP
    • PHP Functions
    • PHP Internal Functions
    • PHP Array Functions

    1 Answer

  • Boris Vukobrat
    Boris Vukobrat
    851 Points

    Quiz question about array_keys

    Posted September 3, 2015 10:11pm by Boris Vukobrat
    Boris Vukobrat
    851 Points
    • PHP
    • PHP Functions
    • PHP Internal Functions
    • PHP Array Functions

    3 Answers

  • Habibur Rahman Dipto
    Habibur Rahman Dipto
    8,496 Points

    need help about array_walk()

    Posted July 5, 2015 10:08am by Habibur Rahman Dipto
    Habibur Rahman Dipto
    8,496 Points
    • PHP
    • PHP Functions
    • PHP Internal Functions
    • PHP Array Functions

    1 Answer

  • Daniel Peterson
    Daniel Peterson
    4,456 Points

    Confused about key value order for array functions

    Posted June 24, 2015 10:59am by Daniel Peterson
    Daniel Peterson
    4,456 Points
    • PHP
    • PHP Functions
    • PHP Internal Functions
    • PHP Array Functions

    2 Answers

  • Magnus Rydberg
    Magnus Rydberg
    4,683 Points

    What is the difference between key and index when we look at an associative array?

    Posted June 16, 2015 5:50pm by Magnus Rydberg
    Magnus Rydberg
    4,683 Points
    • PHP
    • PHP Functions
    • PHP Internal Functions
    • PHP Array Functions

    2 Answers

  • Jerry Schrader
    Jerry Schrader
    4,396 Points

    This is probably something very simple, but for some reason, I get a server error with my code.

    Posted April 15, 2015 12:23pm by Jerry Schrader
    Jerry Schrader
    4,396 Points
    • PHP
    • PHP Functions
    • PHP Internal Functions
    • PHP Array Functions

    1 Answer

  • Derek Dawes
    Derek Dawes
    4,944 Points

    array_walk($names, 'print_info'); question regarding $value, $key

    Posted March 3, 2015 4:49am by Derek Dawes
    Derek Dawes
    4,944 Points
    • PHP
    • PHP Functions
    • PHP Internal Functions
    • PHP Array Functions

    4 Answers

  • Oğulcan Girginc
    Oğulcan Girginc
    24,848 Points

    Wrong link in Teacher's Notes!

    Posted February 17, 2015 5:37pm by Oğulcan Girginc
    Oğulcan Girginc
    24,848 Points
    • PHP
    • PHP Functions
    • PHP Internal Functions
    • PHP Array Functions

    1 Answer

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