Copying a multi-dimensional array

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kcravimss
Forum Newbie
Posts: 2
Joined: Thu Feb 07, 2008 12:40 pm

Copying a multi-dimensional array

Post by kcravimss »

1) How to copy a multi-dimensional array into another array as a value such that changes made to the original array does not get reflected in the replicated(copied) array?
2) How to convert an object into an array?
A sample code snippet accompanying the above mentioned questions will be helpful. Kindly let me know the solution.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Copying a multi-dimensional array

Post by Christopher »

1. Just assign it
2. get_object_vars() maybe

Maybe you could provide a link to the sample code so we could see it too.
(#10850)
Post Reply