tomtees — 2010-09-27T13:38:11-04:00 — #1
How do I copy all of the contents of the $_POST array into my own array?
chris_upjohn — 2010-09-27T13:47:42-04:00 — #2
tomtees — 2010-09-27T14:02:55-04:00 — #3
That doesn't sound exactly like what I want.
My goal is to copy an existing array (i.e. $_POST) into a new array (i.e. MyArray) and not change the structure of the original array (e.g. Keys) in the new array.
guido2004 — 2010-09-27T14:08:00-04:00 — #4
tomtees — 2010-09-27T14:14:18-04:00 — #5
It's that simple?!
I don't have to define anything first?
rguy84 — 2010-09-27T14:16:07-04:00 — #6
shaydez — 2010-09-27T14:16:32-04:00 — #7
why would you want to do that? $_POST is already in Array depending on how you have it coded.
tomtees — 2010-09-27T14:25:01-04:00 — #8
Because I wanted to copy in the values of $_POST into an array that is a data element in my own class.
That way I can handle any sized form and have an object I can pass around containing whatever form values are thrown at it.