I have a string that is generated via a function.
$string = function();
It generates something like:
$string = '<ul><li><a href="">Test</a>(10)</li>';
My question is, how do I move (10)
part into the end of the anchor tag, so we have:
$string = '<ul><li><a href="">Test (10)</a></li>';
I want to do this to all anchor tags in the list items.
What's the appropriate PHP approach?