|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-04-12 15:14 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 04:00:01 2025 UTC |
Description: ------------ xmlrpc_decode produces something like: Array ( [50] => 0.29 ) addressing the addressing it like $variable[50] does not work :-( (empty result), same with '50' as key. Reproduce code: --------------- $response='<?xml version="1.0"?> <methodResponse> <params> <param> <value> <struct> <member> <name>50</name> <value><string>0.29</string></value> </member> </struct> </value> </param> </params> </methodResponse>'; $retval_bugged=xmlrpc_decode($response); print_r($retval_bugged); /* returns: Array ( [50] => 0.29 ) */ Expected result: ---------------- echo $retval_bugged[50]; //should write 0.29 echo $retval_bugged['50']; //should write 0.29 Actual result: -------------- echo $retval_bugged[50]; echo $retval_bugged['50']; //no result foreach($retval_bugged as $key=>$value) { $retval[$key]=$value; } echo $retval[50]; //works