Str_replace is my hot hot sex

Dec 19, 2007 17:43

This, on the other hand, is my hot hot sex.
$text = str_replace('="/', '="http://sussex.ac.uk/', $text);
Struggled for ages with regex before realising that this nifty one-liner is good enough to externalise all internal links and images.
Huxxah!

Leave a comment

Comments 4

alice_princess December 19 2007, 23:36:56 UTC
Str_replace is my hot hot sex

Like CSS?!?

Alice xxx

Reply

tomythius December 20 2007, 13:58:26 UTC
Just like CSS.
Except hotter.
And sexier.

Reply

alice_princess December 20 2007, 15:08:48 UTC
I find it hard to believe that is even possible. =P

Alice xxx

Reply

tomythius December 20 2007, 15:31:26 UTC
Which just goes to show you've never had the good fortune to play with str_replace!

Reply


Leave a comment

Up