- array_splice: documentation ( source)
<?php
$original = array( '1','2','3','4','5' );
echo 'Original array : <br />';
foreach ($original as $x)
{echo "$x ";}
$inserted = '$';
array_splice( $original, 3, 0, $inserted );
echo " <br /> After inserting '$' the array is :<br />";
foreach ($original as $x)
{echo "$x ";}
//- See more at: file:///E:/piyush/www.w3resource.com/www.w3resource.com_/www.w3resource.com/php-exercises/php-array-exercises.html#sthash.kul8GrpR.dpuf
?>