I am trying to build an array to pass to a form. However I keep getting this error
Fatal error:
Unsupported operand types in payment.php on line 177.
It would work while I was creating the file and doing a little testing there, but after that is the error I get.
Below is the array, and i have commented the error line. Please can anyone help me?
while ($row = mysql_fetch_array($res))
{
echo "<tr><td align=center>";
echo $count++ . "</td><td align=center>";
echo $row['Year'] ? $row['Year'] : "Birth";
echo " </td><td align=center>";
echo !strcmp($row['Style'], "oval") ? "Oval" : "Round";
echo " </td><td align=center>" . $row['UnitPrice'];
echo " </td></tr>\n";
$subTotal += $row['UnitPrice'];
$items += array(
$count -1 => array(
'id' => $OrderId,
'description' => 'Fan Since Decal',
'quantity' => '1',
'price' => $row['UnitPrice'],
'option1' => array(
'name' => 'Year',
'value' => $row['Year'] ? $row['Year'] : "Birth"
),
'option2' => array(
'name' => 'Style',
'value' => !strcmp($row['Style'], "oval") ? "Oval" : "Round"
),
),
); //This is where I get the error line 177
}