Serialize variable
XML
<serialize var="var" var_result="var"/>
<serialize /> generates a storable representation of the value of a variable.
<serialize /> is the complement of the UNSERIALIZE operation.
Attributes
| Name | Type | Description | Defined By |
|---|---|---|---|
| var | var | Variable name | serialize |
| var_result | var | Result variable name | serialize |
Results
| Binding | Type | Predicate |
|---|---|---|
| var_result | string | N/A |
Examples
XML
<array var="names">
<item key="bg">Bill Gates</item>
<item key="sj">Steve Jobs</item>
</array>
<output>
<serialize var="names"/>
</output>
<!-- a:2:{s:2:"bg";s:10:"Bill Gates";s:2:"sj";s:10:"Steve Jobs";} -->