asmblah/uniter

Array

Opened this issue · 6 comments

Hi! thank you! cool project!

Please tell me how to transfer an array from php to frontend to php to backend and of course back, now I don't understand at all, maybe there is already some mechanism for this?

Hi @niko-donskoy, thank you for the kind words!

Can you give me an example with code snippets of how your application is currently set up? I think to do what you're asking, we need to serialise the array on one side and deserialise it on the other.

Yes, you say correctly, you need to serialize the array, and send it to the ajax server, do you have an example of serializing an array in uniter? Thank you for your work, you are a genius!

@niko-donskoy as you've probably noticed there is no support in Uniter for any of the serialisation PHP functions yet (serialize(...)/unserialize(...) nor json_encode(...)/json_decode(...)), I will include them in an upcoming release and post back here with an example once they are in place.

Let me know if you need something quicker than waiting for that, as we could instead expose JavaScript's JSON.stringify(...)/JSON.parse(...) functions to PHP on the browser side.

Thank you very much, I have always worked with the web only on the server side, but not on the frontend, and JS is insanely incomprehensible to me, but it's easy for me with php, Thank you, you helped me start working freely with the frontend, just as easy as with php on the server. of course, it is difficult for me to understand and figure out for myself how to transmit and receive, fully exchange arrays, but I would not want to create problems for you and interfere with your free time, so I will wait, but please remember, you are doing a good job, for those who find it difficult with js. Your work is a good way out for me and many of my colleagues from our company and the college where I teach, for my students, it is a new, unusual, interesting look at the web, you give variety, give choice, and the opportunity to work with the web easily and simply! Many students say that php is easy for them and js is hard for them, they also asked to thank you very much for your work!
Thank you!

You are very welcome @niko-donskoy - It's great to hear how much this project has helped you, your colleagues and students. Thanks again for the kind words! Please do keep me informed on how you're getting on, it would be great to learn more about how you are using Uniter and how it could be improved to help you more!

I've now completed the latest platform release I mentioned above. I couldn't include the serialisation changes, but those are next on my list, so they should be in the next release, I'll update here as soon as that's out.

Great! we are very interested! we will write!