> What are the possible values of $file? Are you looking to replace just a
> specific occurance of a $file between <item> tags? Maybe this will help:
>
> $contents = preg_replace("|<item>[^<]*$file[^<]*</item>|si","",$contents);
>
> or just use the 'U' modifier for "ungreedy"...
>

i'm looking to replace the entire <item>....</item> for that respective
file.

the file will have a value of whichever file that record points to, and will
be unique (xml/news/12312312.xml)

should .*? not be ungreedy tho?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to