CodeIgniter Forums
XMLRPC change namings - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: XMLRPC change namings (/showthread.php?tid=44442)



XMLRPC change namings - El Forum - 08-15-2011

[eluser]veledrom[/eluser]
Hi guys,

Code below works but I just want to change the namings in response.

Code:
$response = array (
                   array(
                         'first_name' => array('John', 'string'),
                         'last_name' => array('Doe', 'string'),
                         'member_id' => array(123435, 'int'),
                         'todo_list' => array(array('clean house', 'call mom', 'water plants'), 'array'),
                        ),
                 'struct'
                 );

RESULT
Code:
Array
(
    [first_name] => John
    [last_name] => Doe
    [member_id] => 123435
    [todo_list] => Array
        (
            [0] => clean house
            [1] => call mom
            [2] => water plants
        )

)

How can I replace todo_list with this one?

Thanks

Code:
[step_1] => clean house
            [step_2] => call mom
            [step_3] => water plants