mysql - Need to remove/cleanup junk characters from a text file via php -


my script writing text file can cleaned of junk before being uploaded mysql database. need selectively remove characters cause mysql upload issue while preserving format uploading database

('column1' , 'column2' , 'column3'),

above structure need maintain. if data has junk it, need convert database can read without thinking code , throw error @ me , stopping upload. if raw data looks like

('$%^co--><``lumn1' , 'col[um]n2' , '##colftumn3'),

i need like

('column1' , 'column2' , 'column3'),

any ideas on how write php code open file, clean it, , put contents in original file?

basically need remove not number, letter or character not found in url include // , ? etc

use code like,

$string = str_replace("-","",preg_replace('/[^a-za-z0-9\-]/', '', "$%^co--><``lumn1")); 

and on.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -