Jump to content

preg_match nightmare


johnslater

Recommended Posts

I'm trying to get my head around preg_match or preg_replace because i need it for something i'm building. The problem is it is very confusing and i'm not sure my keyboard can take any more of my mental ranges.

 

Basically i want to replace this...

 

<img:image_name_here_etc:/img>

 

with...

 

crazy_image_function('image_name_here_etc');

 

So that all of the tags in the content (there may be more than one) will be replaced my the function which outputs optimised images. The function words like a charm, but i can't get my head around preg_replace or preg_match.

 

Thanks.

 

Link to comment
https://forums.phpfreaks.com/topic/173347-preg_match-nightmare/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.