mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-25 16:27:20 +00:00
c1f5dc1e40
Both allow a view script or a serialize key with the name of the variable to be serialized.
6 lines
196 B
PHP
6 lines
196 B
PHP
<?php
|
|
$data = array('users' => array('user' => array()));
|
|
foreach ($users as $user) {
|
|
$data['users']['user'][] = array('@' => $user['User']['username']);
|
|
}
|
|
echo Xml::fromArray($data)->saveXml();
|