value of $attributes['st_title']
is <a href="/physical-design-engineers">Physical Design Engineers</a>
I want to remove <a href="/physical-design-engineers">
and </a>
. The final expected output is: $attributes['st_title'] = Physical Design Engineers
I am trying as follows:
$pattern[0] = "/<a.[^>]+>/";
$pattern[1] = '/</a>/';
$replacement[1] = '';
$replacement[0] = '';
$attributes['st_title'] = preg_replace( $pattern, $replacement, $attributes['st_title'] );
But it sets $attributes['st_title']
as empty. Any idea?