Support Us on Patreon

Become a Patron for as little as $5 to gain access to exclusive video features, behind the scenes and Patron-only content.

Beginner-to-Intermediate PHP Part 1: The Magic of the PHP Array

  • Episode 234
  • March 13, 2012

Robbie and Rachel teach you how to create a PHP array and use foreach() to loop through the array and output images to the browser window.

This episode is sponsored in part by: Eco Alkalines, Garden Gate Farms and Cordery Electric.

Topics Covered:

  • Robbie Ferguson and Rachel Xu present live from the Category5 studios in Barrie, Ontario.
  • Pyrosrock walked 8km to be able to watch the show tonight.
  • Announcement: Category5 TV is now a member of the Tech Podcast Network. More info at
  • Rachel's Question: What does "PHP" stand for?
  • Send in your postcards to be featured on the new web site when it launches!
  • Robbie opens a can of ginger ale since we're not allowed to drink beer on a G-Rated show.
  • Garbee choses the word "Now" to shout out in the chat room when someone mistakingly thinks Robbie and Rachel are drinking beer.
  • Viewer Testimonials
  • Viewer Question: What version of DD-WRT do I need for my WNR3500L router?
  • Viewer Question: How can you wear sweaters when it's so hot out?
  • {play 15:18}Why it's important to use a different very strong password for every service you sign up for, and how you can generate them automatically.
  • Generating very strong passwords that are easy to remember.
  • When Robbie doesn't introduce himself, Rachel gets very confused.
  • {play 21:00}The evolution of smartphones and tablets is introducing business networks to a new issue when it comes to bandwidth usage.
  • Viewer Question: Could you setup QOS to solve this issue?
  • {play 25:56}Top Stories from the Category5.TV Newsroom.
  • {play 31:47}Feature: Basic-to-Intermediate PHP Part 1 - The Magic of the PHP Array.
  • Creating our first PHP array.{code} $v=0; $images[$v]['file'] = 'images/1.jpg'; $images[$v]['description'] = 'Image 1'; $v++; $images[$v]['file'] = 'images/2.jpg'; $v++; $images[$v]['file'] = 'images/3.jpg'; $v++; $images[$v]['file'] = 'images/4.jpg'; $v++; print_r($images); {/code}
  • Outputting our array by looping through the array and outputting the images to the browser, and displaying the description if there is one.{code}foreach ($images as $value) { echo ''; echo '
    '; if (isset($value['description'])) echo $value['description']; echo '

    '; }{/code}
  • Viewer Question: Will you be doing Object Oriented PHP?
  • The time change has affected some viewers' ability to make it on time tonight.
  • Viewer Question: What can you actually store in a PHP array?
  • Viewer Question: Can we watch Category5 TV live on the Boxee Box?
  • Viewer Comment: Yes, you can add RSS feeds to Boxee Box.
  • Obtaining a Category5 TV RSS feed to add to the Boxee Box.
  • Viewer Question: My Pogoplug loses its connection due to my ISP's reconnect every 24 hours. Is there something I can do about it?
  • Viewer Question: Are all Category5 TV episodes available through the web site?
  • Viewer Question: If you lost Episode 11, you could redo it! [we did!]
  • Call the Category5 Studio Line: 254-5-CAT5TV

Links to Relevant Web Sites:

  • Host: Robbie Ferguson
  • Co-Host: Rachel Xu


Technology TV is
Please support our Kickstarter

Being Watched

Twitter Posts

Login to Category5

Error message here!

Hide Error message here!

Forgot your password?

Register on Category5

Error message here!

Error message here!

Hide Error message here!

Lost your password? Please enter your email address. You will receive a link to create a new password.

Error message here!

Back to log-in