🤑 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
  • 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.

    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.