Archive for October, 2006

Calling a function from within preg_replace

Thursday, October 12th, 2006

Regular expressions are awesome. However, sometimes doing everything in them is extremely difficult, or impossible. Luckily, we can flex the power of preg_replace's 'e' option to execute the replacement string as PHP code. The reason why I found this is was I was looking for a suitable URL auto-linker ...

Pretty URLs using Multiviews

Thursday, October 12th, 2006

I saw a post on digg.com about how it's nice to have "pretty urls" that are easy to tell people. While i'm not sure anyone would remember rustyrazorblade.com slash some ridiculous post name, it's nice to have for search engines. Unfortunately, it didn't really go into detail about ...