No, You can do it inline or externaly:
$product_option_value_data[] = array(
'product_option_value_id' => $product_option_value['product_option_value_id'],
'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']
);
Or if smallimage
cannot be empty:
$product_option_value_data[] = array(
'product_option_value_id' => $product_option_value['product_option_value_id'],
'name' => $product_option_value_description_query->row['name'],
'price' => $product_option_value['price'],
'prefix' => $product_option_value['prefix']
);
if (isset($product_option_value_description_query->row['smallimage'])) {
$product_option_value_data['smallimage'] = $product_option_value_description_query->row['smallimage'];
}