I have an html document with multiple commented-out PHP arrays, e.g.:
<!-- Array
(
[key] => 0
)
-->
Using PHP, I need to somehow parse the HTML for only these comments (there are other comments that will need to be ignored) and extract the contents. I've been trying to use preg_match_all
but my regex skills aren't up to much. Could anyone point me in the right direction?
Any help is much appreciated!