Hello all.
I have this script:
#price array
$price = array("bol"=>"Highest First", "mal"=>"Lowest First");
$split = explode(', ',$price[$p]);
#date array
$date = array("bol"=>"Newest First", "mal"=>"Oldest First");
$split = explode(', ',$date[$d]);
This code identifies $p(or $d) variables being sent from <a href="some code&p=bol(or mal).index.php. On the same page I have the following code written:
foreach ($split as $list($date)) {
echo $list;
}
foreach ($split as $list($price)) {
echo $list;
}
This writes the $p variable or $d variable in the output "echo $list". My problem is that it gives an error saying that '") is missing on the line where "foreach" is written. I am sure that it is an easy fix... I just don't see it. Can someone see my mistake?
Thank you.