i have a huge text array that contains " " and ' ' in some rows so how can i insert this data into database using php ?
You can wrap the addslashes() PHP: function around your text variable, example addslashes($text) You could also take a look at htmlspecialchars() — Convert special characters to HTML entities
hi, yes addslashes() will work, use it like this, $qry = mysql_query("Insert into tablename (field1,field2) values ('".addslashes($content1)."','".addslashes($content2)."')");
If you're using MySQL, you could also use the MySQL function: mysql_real_escape_string() which will escape the following characters: \x00, \n, \r, \, ', " and \x1a. (php.net)