i have array like this :
$year = Array( [0] => 2019 [1] => 2020 );
i want to join this two array and the array values separ
Everything is already invented:
echo implode('-', $split);
Use implode:
implode
$array = array( 0 => 2019, 1 => 2020 ); $string = implode('-',$array); echo $string;