title: How to save multiple serialize data in php mysql
body: <p>These are the two variable that holds data in array that I want to save in database and serialize before it will save. If I save one variable only ex $add_item_overview.. the serialize data of overview will save but the other one variable is not..and it gives me an undefined error in every parameter that I declare.</p>
  
  <pre><code>    $add_item_overview = array(
          "item_brand" =&gt; $_POST['brand'],
          "item_model" =&gt; $_POST['model'],
          "item_submodel" =&gt; $_POST['submodel'],
          "item_price" =&gt; $_POST['price'],
          "item_yearmodel" =&gt; $_POST['year'],
          );
  
      $add_item_specs = array(
          "engine_capacity" =&gt; $_POST['engine_capacity'],
          "engine_type" =&gt; $_POST['engine_type'],
          "engine_compression" =&gt; $_POST['engine_compression'],
          "engine_broke" =&gt; $_POST['engine_broke'],
          "performance_power" =&gt; $_POST['performance_power'],
          "performance_torque" =&gt; $_POST['performance_torque'],
          );
  </code></pre>
  
  <p>This is my serialize variable and ff sql statement.</p>
  
  <pre><code>$add_item_overview_serialize = serialize($add_item_overview);
  $add_item_specs_serialize = serialize($add_item_specs);
  
  $sql = "INSERT INTO item_newcar_temp(item_overview,item_specs) VALUES ('". $add_item_overview_serialize ."','" . $add_item_specs_serialize . "')";
  </code></pre>