The array_push function adds one or more elements to the end of an array.

    
    $states = ['Idaho', 'Texas', 'Maine'];

    array_push($states, 'New York');

    print_r($states);
    // Array ( [0] => Idaho [1] => Texas [2] => Maine [3] => New York )