-2
爲什麼在我保存序列化數據後,它給了我一個布爾輸出,我的輸入結果是b:1?
下面是已經保存在我的數據庫中的數據。以序列化的形式顯示布爾整數php
a:2:{s:30:"features_safety_number_airbags";b:1;s:29:"features_safety_trans_control";b:1;}
這是插入代碼。
if(isset($_POST['submit'])){
$add_item_features = array(
"features_safety_number_airbags" => isset($_POST['safety_airbags']),
"features_safety_trans_control" => isset($_POST['safety_traction']),
);
$add_item_features_serialize = serialize($add_item_features);
$sql = "INSERT INTO item_newcar_temp(`item_features`) VALUES ('".$add_item_features_serialize."')";
我嘗試使用strpilashes..not工作對我..我只是一個初學者.. – dextree