Answers for "create variable to array in php"

PHP
0

toarray php

<?php
$collection = new DsVector([1, 2, 3]);

var_dump($collection->toArray());
?>
Posted by: Guest on July-27-2021
1

how to store array in variable php

$data = array(
    'something1',
    'something2',
    'something3',
);
extract($data, EXTR_PREFIX_ALL, 'var');
echo $var0; //Output something1
Posted by: Guest on October-20-2020

Browse Popular Code Answers by Language