Passing data from php to XML
982
I've got somthing like this as a XML-Template:
<section>
<label><?php echo $data['fname'] ?> <?php echo $data['lname'] ?></label>
<label><?php echo $data['tel'] ?></label>
<label><?php echo $data['address'] ?></label>
</section>
And I need to pass$data
from an object(or array... doesn't matter) it is an external source where I get the data from.
Can not use post because it is all backend.
How can I fill the labels with the data?
Any ideas?
Answer
Solution:
I can't post the whole code but here is the main part of getting the data inside my template.
This little piece takes my data and fills the template. Disadvantage of this is that i can't do it completly backend. It isn't meant to be used completly backend and i think that is OK for it. Another issue is the "include". Could be a security problem maybe.