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
Post a Comment