Hi Marion, Marian Briones wrote: > I need to strip out the following: ", $ and ,
> $sql = "insert into testglenmoor values (0,'". > implode("','", $arr) ."')"; > mysql_query($sql); > echo $sql ."<br>\n"; > So what I get is one big whopping insert with ALL of the lines in one > line of insertion which, of course, gives me the 'column count' error, > and if MySQL could laugh, it probably would be rolling on the floor. > > So, how can I have my data I paste into the textarea not only get > everything filtered out but get formatted properly to go into a db > table? I've been testing my output by having it return to the screen. You can get rid of a bundle of things by using: $raw = preg_replace('/[EMAIL PROTECTED]/', ' ', $raw); you'll probably need: $raw = nl2br($raw); If magic_quotes_gpc is set to on in your php configuration, it will be escaping things. You'll need to make a lot more checks if it's public. Bob. Community email addresses: Post message: php-list@yahoogroups.com Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/