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] => ) Link to comment https://forums.phpfreaks.com/topic/104784-solved-i-think-i-get-it/ 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" Link to comment https://forums.phpfreaks.com/topic/104784-solved-i-think-i-get-it/#findComment-536391 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); ?> Link to comment https://forums.phpfreaks.com/topic/104784-solved-i-think-i-get-it/#findComment-536392 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.