What are some common methods for manipulating arrays in PHP?

One common method for manipulating arrays in PHP is using array functions such as array_push, array_pop, array_shift, and array_unshift to add or remove elements from an array. Another method is using array_splice to insert, remove, or replace elements in an array at specific positions. Additionally, array_merge can be used to combine multiple arrays into a single array.

// Example of using array_push to add elements to an array
$fruits = ['apple', 'banana', 'orange'];
array_push($fruits, 'pear', 'grape');
print_r($fruits);