I have the following HTML:
<aside>
<p class="opentime">10 - 16</p>
<p class="clocknote">Hours</p>
</aside>
After the 10 and the 16, I want the following code to be added:
<span>00</span>
so that it look like this:
<aside>
<p class="opentime">10<span>00</span> - 16<span>00</span></p>
<p class="clocknote">Hours</p>
</aside>
The span tag should be inserted after only the p tags with the class opentime.
Is there any PHP code to make this possible?
The actual code which is in the PHP is the following:
<?php $main_r_t = $pages->find('response_times/main/') ?>
<?php $r_t = $pages->find('response_times/times.txt') ?>
<aside>
<p class="opentime"><?php echo $r_t->mo_time_1() ?></p>
<p class="clocknote"><?php echo $main_r_t->clock() ?></p>
<p class="opentime"><?php echo $r_t->mo_time_2() ?></p>
<p class="clocknote"><?php echo $main_r_t->clock() ?></p>
</aside>
And the text file looks like:
mo_time_1: 10 - 12
----
mo_time_2: 13 - 19
----