Answers for "copy new array to array php"

PHP
1

copy php array to javascript

var js_array = [<?php echo '"'.implode('","', $php_array).'"' ?>];
Posted by: Guest on March-29-2020
2

php copy array

// PHP will copy the array by default.
$a = array(1,2);

$b = $a; // $b will be a different array

$c = &$a; // $c and $a will be the same array (same reference)
Posted by: Guest on September-23-2021

Browse Popular Code Answers by Language