Here\'s my css link for images:
background-image:url(images/background.gif);
I just want to add some: ../
to change the direct
$css = str_replace("url(images/", "url(../images/", $css);
You must use regex to parse css correctly
regex to parse your code : '/(url)\s*\(\s*[\w\W]+\)/ms'
PHP-CSS-Parser is a CSS parser written in PHP under the MIT license.
Could you not just do a find and replace in your CSS for "(images/" and replace with "(../images/" ??
http://pear.php.net/package/HTML_CSS/