mysql - PHP: How to add an extra field and value in this array -


i have array stores values specific fields. want here add field name , value array. how can it?

array_walk($files_data, 'array_sanitize');          $fields = '`'.implode('` , `', array_keys($files_data)).'`';         $data = '\''.implode('\', \'',$files_data).'\'';     mysqli_query($dbcon,"insert users_info($fields) values ($data) "); 

$files_data['yourfieldname'] = $yourvalue; array_walk($files_data, 'array_sanitize');          $fields = '`'.implode('` , `', array_keys($files_data)).'`';         $data = '\''.implode('\', \'',$files_data).'\'';     mysqli_query($dbcon,"insert users_info($fields) values ($data) "); 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -