php - Get attribute name with simple HTML DOM? -
I am trying to attribute value in the Sample Code: I have to get those values in the list, the desired output is below: The following code will work perfectly to get the data-date value of each Lee. data-date ,
Inside the & lt; Ul & gt; Tags
& lt; Ul class = "media-list" & gt; & Lt; Li class = "media-item" data-date = "2014-04-24 07:30:29" & gt; Tess & lt; / li & gt; & Lt; Li class = "media-item" data-date = "2014-04-25 08:30:29" & gt; Tess & lt; / li & gt; & Lt; Li class = "media-item" data-date = "2014-04-26 09:30:29" & gt; Tess & lt; / li & gt; & Lt; / Ul & gt;
(2014-04-24 07:30:29, 2014 - 04-25 08:30:29, 2014-04-26 09:30:29)
& lt ;? Includes php ('inc / simple_html_dom.php'); $ HTML = str_get_html ('& lt; ul class = "media-list" & gt; li class = "media item" date of data = "2014-04-24 07:30:29" & gt; Tes
Comments
Post a Comment