Guten Tag
Helfen Sie mir bitte,
Ich brauche aus php ajaxfunction eine array zu bekommen
wie kann ich php array auf JavaScript zu importieren ?
Code:
Alles anzeigen
Helfen Sie mir bitte,
Ich brauche aus php ajaxfunction eine array zu bekommen
wie kann ich php array auf JavaScript zu importieren ?
Code:
Quellcode
- //php Sajax
- function add_existind(){
- $info["id"] ="1";
- $info["text"] ="text";
- return $info;
- }
- // javascript
- function Ajax_add(){
- x_add_existind(show_result); // wrapper
- }
- function show_result(){
- //result ist array $info aus php function
- //wie kann ich id , text elementen aus array result zu bekommen?
- // Zb alert(result["id"]) kommt message udentivied
- }