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
  • Stan Byford
    Stan Byford
    9,388 Points

    Sorting arrays syntax error on catalog.php line 28

    Posted October 17, 2019 8:48am by Stan Byford
    Stan Byford
    9,388 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Listing and Sorting Inventory Items
    • Sorting Array Items

    1 Answer

  • Alexander Thieme
    Alexander Thieme
    1,882 Points

    Why is the $sort variable needed?

    Posted February 23, 2019 6:43pm by Alexander Thieme
    Alexander Thieme
    1,882 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Listing and Sorting Inventory Items
    • Sorting Array Items

    1 Answer

  • Amy Hsieh
    Amy Hsieh
    6,023 Points

    What information is really stored in $sort = $item["title"] ?

    Posted December 6, 2018 9:23am by Amy Hsieh
    Amy Hsieh
    6,023 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Listing and Sorting Inventory Items
    • Sorting Array Items

    2 Answers

  • vanessasilva
    vanessasilva
    4,290 Points

    I didn't quite understand why we have to return our $output inside an array in the array_category function?

    Posted November 16, 2017 7:11pm by vanessasilva
    vanessasilva
    4,290 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Listing and Sorting Inventory Items
    • Sorting Array Items

    1 Answer

  • Pol Ribas Pibernat
    Pol Ribas Pibernat
    8,952 Points

    Blank images & data

    Posted June 14, 2017 2:28pm by Pol Ribas Pibernat
    Pol Ribas Pibernat
    8,952 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Listing and Sorting Inventory Items
    • Sorting Array Items

    1 Answer

  • Leigh Maher
    Leigh Maher
    21,830 Points

    Why does the get_item_html have 2 parameters?

    Posted April 6, 2017 10:07am by Leigh Maher
    Leigh Maher
    21,830 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Listing and Sorting Inventory Items
    • Sorting Array Items

    0 Answers

  • Min Chin
    Min Chin
    401 Points

    Sorting arrays wont show up

    Posted March 21, 2017 6:56pm by Min Chin
    Min Chin
    401 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Listing and Sorting Inventory Items
    • Sorting Array Items

    0 Answers

  • Obayanju Damilare
    Obayanju Damilare
    3,383 Points

    Why does $output change to a string

    Posted October 25, 2016 12:07am by Obayanju Damilare
    Obayanju Damilare
    3,383 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Listing and Sorting Inventory Items
    • Sorting Array Items

    1 Answer

  • Alexander Bogdanov
    Alexander Bogdanov
    2,587 Points

    What does $output[$id] = $sort; do?

    Posted July 5, 2016 11:38am by Alexander Bogdanov
    Alexander Bogdanov
    2,587 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Listing and Sorting Inventory Items
    • Sorting Array Items

    4 Answers

  • Robert Engelbert
    Robert Engelbert
    7,229 Points

    keep getting an error

    Posted June 21, 2016 8:02pm by Robert Engelbert
    Robert Engelbert
    7,229 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Listing and Sorting Inventory Items
    • Sorting Array Items

    1 Answer

  • thimoschroeder
    thimoschroeder
    23,470 Points

    Asort clarification needed !

    Posted May 25, 2016 12:46am by thimoschroeder
    thimoschroeder
    23,470 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Listing and Sorting Inventory Items
    • Sorting Array Items

    1 Answer

  • Trần Phúc
    Trần Phúc
    2,264 Points

    Issue use function asort() in php

    Posted May 20, 2016 3:52am by Trần Phúc
    Trần Phúc
    2,264 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Listing and Sorting Inventory Items
    • Sorting Array Items

    0 Answers

  • Trần Phúc
    Trần Phúc
    2,264 Points

    The meaning of ' ' in PHP

    Posted May 20, 2016 3:44am by Trần Phúc
    Trần Phúc
    2,264 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Listing and Sorting Inventory Items
    • Sorting Array Items

    2 Answers

  • Jason Martin
    PLUS
    Jason Martin
    Courses Plus Student 9,316 Points

    Whats wrong with my code?

    Posted April 14, 2016 6:15pm by Jason Martin
    Jason Martin
    Courses Plus Student 9,316 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Listing and Sorting Inventory Items
    • Sorting Array Items

    1 Answer

  • Amber Hoddinott
    Amber Hoddinott
    6,494 Points

    can someone explain to me what the &gt is doing? she says i think that it makes the page title appear on all the pages?

    Posted February 26, 2016 12:39pm by Amber Hoddinott
    Amber Hoddinott
    6,494 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Listing and Sorting Inventory Items
    • Sorting Array Items

    7 Answers

  • Jose Reyna
    Jose Reyna
    13,532 Points

    My code is broken somewhere and I can't find the error.

    Posted February 18, 2016 5:36pm by Jose Reyna
    Jose Reyna
    13,532 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Listing and Sorting Inventory Items
    • Sorting Array Items

    5 Answers

  • yannverreault
    yannverreault
    12,599 Points

    Where comes from the $item variable?

    Posted February 3, 2016 5:23pm by yannverreault
    yannverreault
    12,599 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Listing and Sorting Inventory Items
    • Sorting Array Items

    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