I am trying to assign a variable to each keys and values of an associate array so I can use it later on in php. The key values is dynamically generated
$keys= '';
$items= '';
foreach($_POST as $key => $item) {
$keys .= $key . '<br>';
$items .= $item . '<br>';
}
when echo $keys
item1 price1 unit1 btnsave
and when echo $item
CFGreen 0.16 each EDIT
what I want is to assign a variable to each one
$item1 = item1
$price1 = price1
$init1 = unit1
and exclude the last btnsave