©  Steve Prettyman 2017

Steve Prettyman, PHP Arrays, 10.1007/978-1-4842-2556-1_5

5. PHP Functions—Changing, Splitting, Slicing, and Sorting Arrays

Steve Prettyman

(1)Key West, Florida, USA

After completing this chapter, the student will be able to…

  • Create a simple PHP program which changes the contents of an existing array

  • Create a simple PHP program which splits an array based on a value or comparison

  • Create a simple PHP program which slices an array based on a value or comparison

  • Create a simple PHP program which sorts an array based on a value, comparison, or key

In this chapter we will take a brief look at the PHP functions that are available to change, split, slice, and sort arrays. Many of these functions work with multiple array types (single, ...

Get PHP Arrays: Single, Multi-dimensional, Associative and Object Arrays in PHP 7 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.