ya, you just mis-understood me a little bit....
ok example: there are 10 links on this page ALL links look like:
Code:
<a href=blah.php?remove="proxikal" class="link" id="link">proxikal</a>
<a href=blah.php?remove="phr0ss" class="link" id="link">phr0ss</a>
<a href=blah.php?remove="proxy" class="link" id="link">proxy</a>
See how all those links have the same class name & id, if i were to use
the above code you've given me, it would replace every class="link" wich is absolutely not what i'm looking for.
and str_replace, won't remove html....
to help you guys see what i mean, say i clicked Remove on my friends list
to remove "phr0ss" right? ok...it simply would do this to "phr0ss" But not the other
Code:
<a href=blah.php?remove="proxikal" class="link" id="link">proxikal</a>
<a href=blah.php?remove="phr0ss" class="changed" id="changed">phr0ss</a>
<a href=blah.php?remove="proxy" class="link" id="link">proxy</a>
understand a little easier?
i'v been all over str_replace, ereg_replace, and none of these will remove html code, the code i am looking for would be more like
Code:
$removeit="'phr0ss' class='link' id='link'>phr0ss</a>";
$done="'phr0ss' class='changed' id='changed'></a>";
preg_replace('"/(href=(\"))|($removeit)([\*\.]+) /class=\"([^\"]*)\"/i', ' ', $compile);
now i know thats incorrect, but it gives everyone a good idea of what i'm trying to do, this is far beyond str_replace & ereg_replace, more into Regular Expressions if i can only get preg_replace to replace $removeit
with $done i'd be set...thanks
Bookmarks