serialize
The serialize method takes an array and creates an XML string of the data. This is commonly used for serializing model data.
Простой текст<?phpecho $xml->serialize($data);// format will be similar to:// <model_name id="1" field_name="content" />?>
The serialize method acts as a shortcut to instantiating the XML built-in class and using the toString method of that. If you need more control over serialization, you may wish to invoke the XML class directly.


Коментарии:
Добавить коментарий