phpretard Posted May 8, 2008 Share Posted May 8, 2008 Just On More Thing. This makes a seperate array for each post. Is there a simple fix to put them all into one array from the code you see here? foreach($_POST as $key => $val){ $invoice=array($key => $val); print_r($invoice); } Array ( [customer] => ENS Metals and Jewelry, Inc. ) Array ( [category] => Marketing Material ) Array ( [product] => Tri-Fold Brochure ) Array ( [Cnumber] => 156882 ) Array ( [Qty] => ) Array ( [item] => Marketing Material ) Array ( [Description] => Tri-Fold Brochure | Full Color ) Array ( [Cost] => ) Array ( [Date] => 05-08-2008 ) Array ( [Paid] => ) Quote Link to comment Share on other sites More sharing options...
tronicsmasta Posted May 8, 2008 Share Posted May 8, 2008 $result = array_merge($array1, $array2); googled "php join arrays" Quote Link to comment Share on other sites More sharing options...
Fadion Posted May 8, 2008 Share Posted May 8, 2008 <?php $invoice = array(); foreach($_POST as $key => $val){ $invoice[$key] = $val; } print_r($invoice); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.