|
functional posted:(I would prefer a string solution to this, or something built into the PHP library, and not some big package I have to install.) From the looks of it, you are parsing HTML which in a lot of cases can be malformed. A great extension for helping with that though is Tidy as it can cleanup and repair broken elements. SimpleXML is a nice interface but you also have the option of using the DOM interface for interacting with XML/HTML which can sometimes give a little more flexibility. I find myself using XPath a lot for pulling content out of HTML.
|
# ¿ Mar 28, 2008 11:37 |
|
|
# ¿ May 8, 2024 18:47 |