Array function challenges

Description

Collection: PHP Programming BasicsChapter: How to Work With Arrays in PHP

Transcript

Now, arrays are kind of unusual and they're a bit tricky to work with especially at first, but the payoff is great. If you can get comfortable with arrays, you're going to find a lot of doors opening when it comes to programming. So here's a few things you can do to play around with the functions that we worked with in these last sections, and just get a little bit more practice working with them.

So first of all, see if you can figure out how to sort an array in reverse order. So we use the function asort() in order to sort by value ascending, and the function ksort() in order to sort by key ascending. See if you can sort by the val ...

When you have an active membership, you will be able to see your progress here.

Skill focus: ProgrammingSkill level: Beginner - Advanced

In this collection, we walk you through everything you need to know to build rich PHP applications and work with PHP code in Drupal. These videos are designed to bridge the gap between Drupal site builders and programmers. We guide you gently through the basics of PHP, and work our way into building more and more complicated scripts. In our final example we build a custom CMS, which will help you understand the architecture of Drupal while flexing your new PHP skills in a practical way.

To follow along with these videos, you will need a web environment set up on your computer. Follow the videos in Setting Up a Web Environment With Drupal to get an environment set up on Windows, OSX (Mac) or Linux.

Some of the key points we'll be covering include:

How to work with variables and functions

How to use logic in PHP like if…then statements and looping

How to build forms in PHP

How to store persistent data in sessions

How to work with MySQL

How to build a simple CMS from scratch

Who this collection is for

This collection is for those that want to learn PHP programming. You may want to learn PHP to work with Drupal in particular, but what you learn will be useful for any project you work on requiring a background in PHP.

It looks like there might be an issue playing videos in this browser. We're working on better cross-brower experience, but in the meantime please try the latest Chrome or Firefox browsers. Or, you may be able to watch the video directly without progress tracking or transcript: