by Heather | Oct 1, 2017 | Uncategorized
Duplicating arrays is a pretty common task for developers. Here’s 3 ways to copy $myArray to $arrayCopy: Method 1: Reference (shallow copy) In this example, $arrayCopy becomes another reference to $myArray. Updates to $myArray also update $arrayCopy. $arrayCopy...
Recent Comments