Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array #68

Open
niko-donskoy opened this issue Jan 2, 2023 · 6 comments
Open

Array #68

niko-donskoy opened this issue Jan 2, 2023 · 6 comments
Assignees

Comments

@niko-donskoy
Copy link

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?

@asmblah
Copy link
Owner

asmblah commented Jan 14, 2023

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.

@niko-donskoy
Copy link
Author

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!

@asmblah
Copy link
Owner

asmblah commented Jan 31, 2023

@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.

@niko-donskoy
Copy link
Author

niko-donskoy commented Feb 22, 2023

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!

@asmblah
Copy link
Owner

asmblah commented Mar 6, 2023

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.

@asmblah asmblah self-assigned this Mar 6, 2023
@niko-donskoy
Copy link
Author

Great! we are very interested! we will write!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants