There is a similar question to this on StackOverflow. But, My question is a little different.
I have selected the image with the required class whose image I want. Earlier, I used
element->src
to get the value of src attribute, but now the site has replaced it with 'data-src'.
I do not have the full contents of a tag, hence I can not use preg_replace. I Have the reqired element, I just want to be able to do something like
$element->data-src
I am trying to do this using PHP SIMPLE HTML DOM PARSER, but no luck yet.
Try using
$element->{'data-src'}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With