Feed on
Posts
Comments

Tag Archive 'regular expressions'

This evening I got a comment on my post about how to detect when cell phones access your web site. It was a question about the way I went about the PHP code for matching a bunch of small text snippets against the User Agent string.

Basically, I put all the text snippets in a [...]

Read Full Post »

Replacing a short bit of text in PHP is easy. You just use str_replace, as in $bobo = str_replace("foo","bar",$bobo). That will replace all instances of "foo" with "bar" in the string $bobo.

But, on a recent contract, I had a client's site where it only worked properly in Microsoft Internet Explorer and part of [...]

Read Full Post »

Validation is the art of checking and modifying input from users so that it's all of what your web site needs and none of what it doesn't want. Validation can be as complex as anti-hacking and anti-spam measures or as simple as making sure someone's not putting their phone number in the box meant [...]

Read Full Post »