Jump to content

[SOLVED] Adding variable


timmah1

Recommended Posts

I have a list of items for sale.

My items are listed with radio buttons

<input name="package_[<?=$a[name]; ?>]" type="radio" value="<?=$a[price];?>"><?=$a[name];?>: <?=$a[price];?>

 

If I'm using this to grab everything that was clicked

 

while (list ($name,$val) = @each ($_POST['package_'])) {
echo "$name $val";
}

 

How can I add all the values together to get a total price?

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/136389-solved-adding-variable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.