Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php insert in array

$original = array( 'a', 'b', 'c', 'd', 'e' );
$inserted = array( 'x' ); // not necessarily an array, see manual quote

array_splice( $original, 3, 0, $inserted ); // splice in at position 3
// $original is now a b c x d e
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #insert #array
ADD COMMENT
Topic
Name
9+4 =