The array_unshift function adds an element to the beginning of an array.

    
    $fruits = array('apple', 'banana', 'cherry');

    array_unshift($fruits, "peach");

    print_r($fruits);
    // Array(
    //  [0] => peach
    //  [1] => apple
    //  [2] => banana
    //  [3] => cherry
    // )