Question will be, .. what do you want ?? Do you want data, like
a[0]=3; a[1]=2; or declarative parts of data. Like a=[]; // this part only create storage area.. a[4]=3; a[10]=2; ?? If you want only data, your actual code is ok, But if you want declarative part,(like a=[]; ) build a string or array of string to past your declarative part... And get it, as text or as code/data (json or text to eval or integrate in your page as a script.) De : [email protected] [mailto:[email protected]] De la part de Happy Meeple Envoyé : mardi 4 mars 2014 14:29 À : APE Project Objet : Re: [APE Project] sending an array I send the array from the client. And get it back via PHP. Now I do this, which is an ugly workaround: return {name: "list_of_user_ids_and_match_ids", data:{user_ids:list_of_user_ids,match_ids:list_of_match_ids}}; where I separate the key and the value in two different arrays. <http://www.happymeeple.com/en/> Nicolas Guibert Games in Mind Ltd Managing director 7 Spencer Walk London NW3 1QZ Tel: +44 (0)207 435 0315 UK Mobile: +44 (0)7438 657 537 French Mobile: +33 (0)7 53 17 20 13 Email: [email protected] 2014-03-04 13:14 GMT+00:00 Pablo Tejada <[email protected]>: Do you send the array from the client or from the server? You can try sending the same array as part of an object. Ex: payload = {list: a} Where 'a' is your array. On Mar 4, 2014 7:31 AM, "Nicolas" <[email protected]> wrote: Hi, I realize that when I send this array: a=[]; a[4]=3; a[10]=2; I receive: a[0]=3; a[1]=2; Why is that? How can I go around this? -- -- You received this message because you are subscribed to the Google Groups "APE Project" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] <mailto:ape-project%[email protected]> For more options, visit this group at http://groups.google.com/group/ape-project?hl=en --- APE Project (Ajax Push Engine) Official website : http://www.ape-project.org/ Git Hub : http://github.com/APE-Project/ --- You received this message because you are subscribed to the Google Groups "APE Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:ape-project%[email protected]> . For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups "APE Project" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] <mailto:ape-project%[email protected]> For more options, visit this group at http://groups.google.com/group/ape-project?hl=en --- APE Project (Ajax Push Engine) Official website : http://www.ape-project.org/ Git Hub : http://github.com/APE-Project/ --- You received this message because you are subscribed to the Google Groups "APE Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups "APE Project" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/ape-project?hl=en --- APE Project (Ajax Push Engine) Official website : http://www.ape-project.org/ Git Hub : http://github.com/APE-Project/ --- You received this message because you are subscribed to the Google Groups "APE Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups "APE Project" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/ape-project?hl=en --- APE Project (Ajax Push Engine) Official website : http://www.ape-project.org/ Git Hub : http://github.com/APE-Project/ --- You received this message because you are subscribed to the Google Groups "APE Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
