preg_match_all need help to return whole string.

[php]
preg_match_all("/[VID](.*?)[/VID]/ims", $content, $matches, PREG_SET_ORDER);
foreach($matches as $match){
$content = str_replace($match[0],’

Thats the code I got now. And it only returns “Dose this work? embedded video” thats it, it dose not return what comes after [/VID].

This will be inside a while loop, that will loop out many posts on the page, and now it dose only loop out the first one, and then halt after [/VID] and dose not show anyone other posts.

Is it the pattern that i meesed up with?

Would be very happy with some help on this problem of mine, worked on it for hours now, but can not get it to work as I want.

Regards.

I thin preg_replace() is better suited for this task

Sponsor our Newsletter | Privacy Policy | Terms of Service