# Switching arrays

**URL:** <https://forum.kirupa.com/t/switching-arrays/266268>\
**Category:** Uncategorized\
**Created:** [July 17, 2008, 9:35pm UTC](https://forum.kirupa.com/t/switching-arrays/266268 "2008-07-17T21:35:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ph03nix](https://avatars.discourse-cdn.com/v4/letter/p/a8b319/32.png) [@Ph03nix](https://forum.kirupa.com/u/Ph03nix)\
**Post date:** [July 17, 2008, 9:35pm UTC](https://forum.kirupa.com/t/switching-arrays/266268/1 "2008-07-17T21:35:43Z")

</div>

I have a 2-dimensional array, let’s call it array1, and I want it to become array2. I tried simply writing array1 = array2, but it doesn’t work properly. I was told by someone that I have to replace array 1 one value at a time into array2 with a for loop. Does anyone know how to do this? Also, what do I do if the arrays are different sizes? ex. array1 = 5x10, array2 = 6x8
