This is a simple PHP snippet which will turn Twitter #Tags into link’s. This technique requires a regular expression function called preg_replace().
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <?php // Setup the example string $text = 'Am example string containing some #hash #tags'; // Apply the regular expression $text = preg_replace( '/\s#(\w+)/', '<a href="http://search.twitter.com/search?q=%23$1">#$1</a> ', $text ); //turn twitter #tags into links // Trace the string print $text; // The ouput string: // Am example string containing some // <a href="http://search.twitter.com/search?q=%23hash">#hash</a> // <a href="http://search.twitter.com/search?q=%23tags">#tags</a> ?> |

Woah! I’m really loving the template/theme of this blog. It’s simple, yet effective.
A lot of times it’s challenging to get that “perfect balance” between superb usability and visual appearance. I must say you have done a superb job with this. In addition, the blog loads super quick for me on Chrome. Exceptional Blog!