Quote:
|
$div_classes = array('PopActivateApply');
|
this creates an array with a single string element - the word 'PopActivateApply' - it has no connection to the variable $html
If you just want to replace 'div' with 'a' then I'm not sure why you need regex:
PHP Code:
$html1 = str_replace('<div', '<a', $html);
$html_final = str_replace('div>', 'a>', $html1);
Regex might be useful if the html is malformed; that is, if there are unwanted spaces in the original.