Here’s some sample XHTML.
<!-- 5-image layout -->
<div class="loa_line">
<div class="loa_trailer">{BOX_TRAILER}</div>
<div class="loa_img1">{BOX1_IMAGE}</div>
</div>
<div class="header"></div>
<div class="loa_line">
<div class="loa_img2">{BOX2_IMAGE}</div>
<div class="loa_img2">{BOX3_IMAGE}</div>
<div class="loa_links">{BOX4_TEXT}</div>
</div>
Let’s say I want to extract {*} from this and store them as an array. My current preg_split regex is:
"[\{(.*?)\}]"
This however gives me the following output:
Array ( [0] =>
[1] =>
[2] =>
[3] =>
[4] =>
[5] =>
)
It’s counted the number of {} instances correctly (er, I think. It seems to have added one). However, it did not return the {}. The array is populated with empty values.
How would I go about getting the "{*}"s as strings in an array? I want to use them for a later function, see.