Reading HTML Tags
Posted: Sun Jan 02, 2011 4:34 pm
I'm making a web crawler in PHP and I need some help when getting information from within tags.
For example, if I had this variable:
How would I get the information within the bold tags into an array like this?:
1. How are you?
2. I like cake!
Thanks for your help!
For example, if I had this variable:
Code: Select all
$code = "<p>hello <b>How are you?</b> yum <b>I like cake!</b></p>";1. How are you?
2. I like cake!
Thanks for your help!