I have a string variable in PHP , its content is:
$var='<SPAN id=1 value=1 name=1> one</SPAN>
<div id=2 value=2 name=2> two</div >';
....
I need a function for surround html attributes with "" i need do this for the all meta-tag
,etc the result should be this:
$var='<SPAN id= "1" value="1" name="1"> one </SPAN>
<div id="2" value="2" name="2" > two</div >';
...
I need replace all =[a-z][A-Z][1-9] for ="[a-z][A-Z][1-9]". I need a regular expresion for preg_replace