0

This html structure comes from some other url and we need to extract using file get content or using curl

enter image description here

The <div> structure shown above in the image.
What i want to do is convert this <div> structure into a json encode structure.
But in json array structure it should look like.
partition need to be made based on <h2> tag followed by their <div> tags.
eg: if first <h2> tag containes one <div> tag then <h2> tag array must contain only one sub array of <div> tag.
if <h2> tag followed by three <div> tag then <h2> tag array must contain three sub array of <div> tags.
2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.