Hi all,
In PHP just wondering if anyone knows whether one method of creating multiple indexes within an array is more efficient / preferable to another?
`
$listing['one'] = $x;
$listing['two'] = $y;
$listing['three'] = $z;
`
or:
$listing = [
['one'] => $x,
['two'] => $y,
['three'] => $z
];
Most of the time I unthinkingly do the former, but it occured to me that it's quite possible the latter is more efficient.
Any thoughts?