Subscribe<span class="heading">This is</span><span class="bodytext">not a heading.</span>I can match a string like this just fine using this regex: <span class=\"(.*?)\">(.*?)</span> in preg_match_all. What I want to do is return a multi-dimensional array in case of nested spans, which currently confuse the hell out of my code (and me!). For example:
<span class="heading">This <span class="shiny"> is a</span> lovely heading</span>&span class="bodytext">bla bla.</span>
You are not logged in, either login or create an account to post comments
posted by PuGZ at 4:32 PM on January 8, 2006