OK, I have found a solution ...

Just use an object to allow this (thanks Derrel ...).

for example : in your javascript code set

record={field1: value1, field2: value2, ...}
res = rpc.callSync("saveData", "mytable", record);

You must retrieve this in your PHP callback

function method_saveData($params,$error) {
 // you can access your fields in using
 rec=params[1];
 rec->field1 = ....
 rec->field2 = ....

}

Hope this will help a lot

Cheers
Eric


ericson wrote:
> 
> Hi all,
> 
> 
> I'd like to pass an array with "keys" to a PHP file through RPC.
> 
> var record=[value1,value2,...];
> res = rpc.callSync("saveData", "mytable", record);
> 
> it works well, but in fact I would like to retrieve in my PHP program an
> array like :
> 
> record ["field1"=>value1, "field2"=> value2, ...]
> 
> How I can specify "field1", "field2", ... with record variable in the
> javascript program, each time I tried something like {field1: value1}, ...
> the PHP program receive an object ?!
> 
> Thanks for your help
> Eric
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-pass-indexed-array-to-PHP-tf3133188.html#a8694266
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to