I can not find PHP simple HTML dom to get data from custom data attributes
I The code changes that are made, it just returns all types of elements and data, and not just custom data attributes such as code - such as data-XYZ
.
I have read other questions / answers that suggest using the {}
, but I do not have to do this work that I can write quotes, apopropas, square braces etc. How to make curly braces around
Example of HTML I'm trying to extract the data from:
link to data A, B, C, D - and
foreach ($ html-> search ('[data-name]') as $ data {echo $ data- & Gt; Plain text; Echo "& lt; br & gt;"; }
I want data from custom attributes in
li
: data-name
data-info
data-addressWhat am I currently receiving from H3
& lt; P & gt;
RegionsHow do I apply
$ html-> search ('[data-name]' to them if I just use
?{}
) Can i
It should look like this:
$ html->; (Find '[Data-Name]', 0) - & gt; {'Data-name'}
Comments
Post a Comment