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: 139
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