title: learning mysql insert returns syntax error
body: <p>I'm trying to make a simple insert statement of user... but it errors out... I tried with only values and it works, it must be something with the way I deal with arrays inside the insert statement?</p>
  
  <p>ANy ideas?</p>
  
  <pre><code>                if ($new_user_data) {
                      $mysqli-&gt;query("INSERT INTO users (user_name, user_year, user_sex, user_pic, user_level, user_password, user_email)
                                      VALUES ( ". $new_user_data['user_name'] .",". $new_user_data['user_year'] .",". $new_user_data['user_sex'] .",". $new_user_data['user_pic'] .",1,". $new_user_data['user_password'] .",". $new_user_data['user_email'] ." )");
                      print_r($mysqli-&gt;error);
                  }
  </code></pre>
  
  <p>error:</p>
  
  <pre><code>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@gmail.coms )' at line 2
  </code></pre>