preg_replace on actionLinks

3 posts by 2 authors in: Forums > CMS Builder
Last Post: February 23, 2015   (RSS)

By Djulia - February 23, 2015 - edited: February 23, 2015

HI,

I would like to hide certain erase links in a list.

I try to use this preg_replace. But that does not function.

$actionLinks  = preg_replace("/<a href=/\"/javascript:confirmEraseRecord('{$tableName}','{$record['num']}');/\"/>.*?<\/a>/", "", $actionLinks);

Would somebody have an idea?

Thanks!
Djulia

By claire - February 23, 2015

Hi Djulia

Pouvez-vous utiliser le function str_replace() à la place? C'est possible que le motif regex dans preg_replace() ne correspond pas à le lien ici.

Can you use the function str_replace() instead? It's possible that the regex pattern in preg_replace() does not match the link here.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/