I have an issue with the code I am working on and realised I need some help with it as I can not find out what I am doing wrong.
The following code is just at part of a bigger code (that works fine) and I would be thankful if someone could point me in the right directions with this one.
This part works good
$xt_pieces = 100;
$arrts = array();
foreach (range(10, $xt_pieces, 2) as $number)
{
$arrts[$number/2] = $number. ' pieces';
}
print_r($arrts);
But when I try to use the array inside another array it doesn´t work at all
'amount' => array(
'FriendlyName' => 'pieces',
'Type' => 'dropdown',
'Options' => $arrts,
)) : false))); // <-- error for this line
ERROR MESSAGE
syntax error, unexpected ':', expecting ')'
I tried google and searched various forums about this, but I just can´t find out how to solve this.