I have a variable that I want to put questions and answers into. There maybe one Q&A or lots.
Can anyone think of how I could parse the variable using php so I can format it nicely? e.g.
from:
(q)question text(q)(a)answer text(a)
to:
<div class="qa">
<div class="q">question text</div>
<div class="a">answer text</div>
</div>
or would it be easier just to add this all ot the variable at the time of entry so no parsing is required... or, something else entirely...?
Thanks,
Paul.
Can anyone think of how I could parse the variable using php so I can format it nicely? e.g.
from:
(q)question text(q)(a)answer text(a)
to:
<div class="qa">
<div class="q">question text</div>
<div class="a">answer text</div>
</div>
or would it be easier just to add this all ot the variable at the time of entry so no parsing is required... or, something else entirely...?
Thanks,
Paul.
Comment