I'm trying to generate an array for a price selection box and i keep
getting this error on the php page:
"Parse error: parse error, expecting `'('' in
/var/www/html/site/index.php on line 13"
Line 13 refers to "array_name= array["0"];" line.
I've tried:
-"array_name= array("0");"
Could someone help, the code is below.
function price_array($array_name){
$array_name= array["0"]; //declare array
for ($i=0;$i <= 10000000;$i=$i+100000){
$array_name = array_push($array_name,"$i");
}
return $array_name;
}
//call
$smarty->assign('sell_price1', array (price_array('price_from')));