I have variable $menu
type array like below:
$menu = array('<li class="page_item page-item-155">',
'<li class="page_item page-item-49">',
'<li class="page_item page-item-72">',
'<li class="page_item page-item-18">',
'<li class="page_item page-item-50">');
I want to replace the first original string
<li class="page_item page-item-155">'
to
<li class="current">
In the end of the string it can be any number, the numbers are not constant.
I think I need to use a regular expression but I don't know how to implement it.
$menu = str_replace($original_strs_array, $replacement_strs_array, $menu);
How can I do that? Thanks.