---
title: "serialize — Serialize variable"
description: "iXML command serialize: Serialize variable."
canonical_url: "https://www.zeyos.com/ixml/ref/serialize"
markdown_url: "https://www.zeyos.com/ai/guide/ixml/ref/serialize.md"
section: "ixml-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/ixmldoc.xml"
source_sha256: "a23f04e6a98628ca3c273c3b8dd2c33c034cfda3e0f00478d8793074fd2f70dd"
---

# serialize — Serialize variable

SERIALIZE generates a storable representation of the value of a variable.

SERIALIZE is the complement of the UNSERIALIZE operation.

### Attributes
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| var | var |  | Variable name |
| var_result | var |  | Result variable name |

### Children
- (none)

### Parents
- (not restricted in the reference)

### Result
- binding: var_result; type: string

### 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";} -->
```
