Wednesday, 14 February 2018

php - Parsing HTML element into parts

I'm trying to parse the following code:






Essentially what I need is:



Array
(

[0] => [1] => border="0"
[2] => cellpadding="0"
[3] => cellspacing="0"
[4] => height="100%"
[5] => width="100%"
[6] => id="bodyTable"
[7] => style="table-layout: fixed;max-width:100% !important;width: 100% !important;min-width: 100% !important;
)



However when doing this with a simple explode(" ", $str); I'm getting the "style" split up too, is there a simple way to parse this and loop through it?

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...

Blog Archive