Tag Archives: replace

PHP Script to Trim and Replace Apostrophes for Each Value in Each Column of Each Table in a MySQL Database

I needed to quickly whip up a script that would strip all leading and trailing whitespace plus replace any apostrophes or quotation marks with their web code equivalent for each and every value that appeared in every row, column and table in the database. Continue reading

Posted in Technology & Code, Tutorials | Tagged , , , , , , , , , | View Comments

PHP: How to Get all the Numbers out of an Alphanumeric String?

Given a registration code, or something important like that, which often contains information encoded in the alphanumeric string itself, it is sometimes quite useful to be able to simply strip out the letters from the string, leaving only the numeric part behind. Continue reading

Posted in Technology & Code, Tutorials | Tagged , , , , , , | View Comments

PHP: How to Get all the Letters out of an Alphanumeric String?

Given a registration code, or something important like that, which often contains information encoded in the alphanumeric string itself, it is sometimes quite useful to be able to simply strip out the numbers from the string, leaving only the letters behind. Continue reading

Posted in Technology & Code, Tutorials | Tagged , , , , , | View Comments