Can I assign an array just by making it equal to another array?

Posted by Roman on Stack Overflow See other posts from Stack Overflow or by Roman
Published on 2010-06-16T14:41:42Z Indexed on 2010/06/16 15:12 UTC
Read the original article Hit count: 134

Filed under:
|

I have an array $x with nonzero number of elements. I want to create another array ($y) which is equal to $x. Then I want to make some manipulations with $y without causing any changes to $x. Can I create $y in this way:

$y = $x;

In other words, if I modify $y created in the above shown way, will I change value of $x?

© Stack Overflow or respective owner

Related posts about php

Related posts about arrays