I have the following html string in php
$html='<div style="display:block; float:left; width:40px;"> </div><a href="http://cosa.gr/index.php?cPath=15" class="headerNavigation">text</a>';
and I need to add an ‘h1’ html element in the a element were the string text is in an programmatical way.
The bellow code shows the result I need.
$html='<div style="display:block; float:left; width:40px;"> </div><a href="http://cosa.gr/index.php?cPath=15" class="headerNavigation"><h1>text</h1></a>';
Is there a way to do this?
Insert
headingtag into the lastanchortag: