Hacking with PHP has been updated for PHP 7 - click here! >>

Array-specific functions

Although arrays are great by themselves, their real usefulness only comes out when you use special array functions to manipulate your data - this was why we had to cover functions before arrays.

There are quite a few array functions all doing a variety of things, and you need not learn them all - your best bet is to give them all a try so that you at least know how they work, then get back to working on normal code. You'll soon learn what works for you best!


If this was helpful, please take a moment to tell others about Hacking with PHP by tweeting about it!

Next chapter: Chopping and changing arrays >>

Previous chapter: Returning arrays from functions

Jump to:


Home: Table of Contents

Copyright ©2015 Paul Hudson. Follow me: @twostraws.