forked from extern/egroupware
Process multi-dimensional array values to one more level deep
This commit is contained in:
parent
898f57ae42
commit
af775b2be8
@ -148,7 +148,18 @@
|
||||
{
|
||||
while(list($key,$val) = @each($args))
|
||||
{
|
||||
$ele[$key] = CreateObject('phpgwapi.xmlrpcval',$val, 'string');
|
||||
if(gettype($val) == 'array')
|
||||
{
|
||||
while(list($x,$y) = each($val))
|
||||
{
|
||||
$tmp[$x] = CreateObject('phpgwapi.xmlrpcval',$y, 'string');
|
||||
}
|
||||
$ele[$key] = CreateObject('phpgwapi.xmlrpcval',$tmp,'struct');
|
||||
}
|
||||
else
|
||||
{
|
||||
$ele[$key] = CreateObject('phpgwapi.xmlrpcval',$val, 'string');
|
||||
}
|
||||
}
|
||||
}
|
||||
$arr[] = CreateObject('phpgwapi.xmlrpcval',$ele,'struct');
|
||||
@ -191,7 +202,18 @@
|
||||
{
|
||||
while(list($key,$val) = @each($args))
|
||||
{
|
||||
$ele[$key] = CreateObject('phpgwapi.xmlrpcval',$val, 'string');
|
||||
if(gettype($val) == 'array')
|
||||
{
|
||||
while(list($x,$y) = each($val))
|
||||
{
|
||||
$tmp[$x] = CreateObject('phpgwapi.xmlrpcval',$y, 'string');
|
||||
}
|
||||
$ele[$key] = CreateObject('phpgwapi.xmlrpcval',$tmp,'struct');
|
||||
}
|
||||
else
|
||||
{
|
||||
$ele[$key] = CreateObject('phpgwapi.xmlrpcval',$val, 'string');
|
||||
}
|
||||
}
|
||||
}
|
||||
$arr[] = CreateObject('phpgwapi.xmlrpcval',$ele,'struct');
|
||||
|
Loading…
Reference in New Issue
Block a user