last day (15 days later) » 

10:40 PM
2
A: Run php action for every element

Rajdeep PaulFrom your comment, ... I think that it returns just an array like this : "1,2,3,6" That's a string, not an array by the way. Assuming the fact that $receivedIds is a string of this format, "1,2,3,6", the solution would be like this: Apply explode() function on $receivedIds to get an array...

 
I'm sorry but it returns 1,2,3,4 without ""
 
@0ndre_ Yup, that's a string. Test your application with the above code snippet, I believe this will resolve your issue.
 
Thanks :) I will do that asap.
So : {"event_id":2},{"event_id":3} this is what it actually returns.. :/. I am really sorry.
 
@0ndre_ Does echo json_encode($returnValue); produce this output? What's your expected output?
@0ndre_ I've updated my answer. Test your application with the updated code snippet, see if you're getting expected output or not.
 
I added 2 lines. First one is echo json_encode($result); it prints: [{"event_id":2},{"event_id":3}] and the second one: echo json_encode($receivedIds); it prints : null . I guess that is the problem :/
 
10:40 PM
@0ndre_ echo json_encode($receivedIds); will print null because $receivedIds is a string, not an array. Have you tested your application with the updated code snippet, http://stackoverflow.com/revisions/39560338/2?
 
I have updated code what it looks like now. unfortunately it still prints: {"status":"error","message":["Could not find records for id"]}
 
I really appreciate that you are trying to help me. :)
Hi
 
Based on your updated code snippets, I've modified the code. http://pastebin.com/0VYcRMzK
It's my pleasure. :-)
 
OMG it works!! :D
 
10:44 PM
Phew Glad to know it worked for you. :-)
Let me update the answer.
 
Awesome :)
 
Thanks for marking the answer as accepted.
 
You deserve it!!
 
Please check the answer I updated just now. See if you are okay with it.
 
Yes that is exactly how it is supposed to be. :)
 
10:55 PM
Thanks mate! :-) Have a nice day, bye.
 
Yes you too. Bye
 

last day (15 days later) »