I've tried a few things but I don't know how to go about doing this. Please can you have a look at my code and tell me how I could get that?
foreach($SESSION as $key => $val)
{
$productdetails = $val;
$pspackdetails = ereg_replace("", "</span><span class='colour'>", $val);
$pspackdetails = ereg_replace("-x-", "</span><span class='rates'>", $pspackdetails);
$pspackdetails = ereg_replace("--y--", "</span><span class='dimensions'>", $pspackdetails);
if($val != "Submit") { if($val != "Add To Cart") { if($val != "keane") { if($val != "ian") {
if($val != '')
{
if(preg_match('|_q$|',$key))
{ echo '<span class="quantity"><input name="'.$key.'" value="'.$pspackdetails.'" type="text" size="3"></span><br>'; $amount = $pspackdetails; }
if(preg_match('||',$key)) {
$parts = explode('-x-',$productdetails);
for($i = 0; $i < count($parts); $i++) // we start at zero
{
$prices[] = strtr($parts[$i],'_',' '); // and clean the underscore
}
echo '<span class="item">'.$pspackdetails.'</span>'; }
// MULTIPLICATION BIT
print "<b>".($parts[1] * 1)."</b> Amount: $amount";
}
}
} } } }
echo '</p><p align="center"><input type="submit" name="Submit" value="Submit"></p></form><p align="center"><a href="javascript:history.go(-2)">Back to Shopping</a></p>';
}