我有一个这样的条件字符串:
echo $cnd = "'use_funds'=>'no'";
我的$data数组是:
$data = array(
$cnd,
'quantity' => $_POST['qty_' . $q],
'veg_name' => $_POST['veg_name_' . $q],
'rate' => $_POST['rate_' . $q],
'ws_price' => $_POST['ws_price_' . $q],
'ret_price' => $_POST['ret_price_' . $q],
'mop' => $_POST['mop_' . $q],
'ret_margin' => $_POST['ret_margin_' . $q]
);
以上echo $cnd说明'use_funds'=>'no',不过var_dump($data)说明array
0 => string ''use_funds'=>'no'' (length=17)。因为它是一个字符串,所以我的数据没有插入到我的表中。如何使$cnd关联数组元素而不是字符串?