At the moment I have the following
$elem = $reading->find('div[class=time-default]', 0);
$elem = str_replace("<div class=\"time-default\">","",$elem);
$elem = str_replace("</div>","",$elem);
This code looks for <div class="time-default"></div>
and does various replaces on it. My question is, if $reading
contains multiple DIVs with this class, how can I target the 1st, 2nd, 3rd, Nth one?
I am using this in conjunction with http://simplehtmldom.sourceforge.net/ if that helps
Thanks
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.