Here is my code
$product_option_value_data[] = array(
'product_option_value_id' => $product_option_value['product_option_value_id'],
if (isset($product_option_value_description_query->row['smallimage'])) {
'smallimage' => $product_option_value_description_query->row['smallimage'],
}
'name' => $product_option_value_description_query->row['name'],
'price' => $product_option_value['price'],
'prefix' => $product_option_value['prefix']
);
can i do something like this....
here is my error
Parse error: syntax error, unexpected T_IF, expecting ')' in /Users/mattelhotiby/Sites/posnation/shop_pos/catalog/model/catalog/product.php on line 419
Actually i did this
if (isset($product_option_value_description_query->row['smallimage'])) {
$smallimage = $product_option_value_description_query->row['smallimage'];
}else{
$smallimage = '';
}
$product_option_value_data[] = array(
'product_option_value_id' => $product_option_value['product_option_value_id'],
'smallimage' => $smallimage,
'name' => $product_option_value_description_query->row['name'],
'price' => $product_option_value['price'],
'prefix' => $product_option_value['prefix']
);
But I still want to know if there is a way to do an if within this array declaration.