Answer the question
In order to leave comments, you need to log in
Problem with json getting data from php?
Hello, can someone explain one thing to me. why when passing data via ajax with php when i create json string in this way
echo json_encode($s = array(array('grief' => $buys1,'skyblock' => $buys2),array('grief' => $buys1+1,'skyblock' => $buys2+1)));
Everything works fine, but I need to make this list separately$s = array(array('grief' => $buys1,'skyblock' => $buys2),array('grief' => $buys1+1,'skyblock' => $buys2+1));
echo json_encode($s);
as a functionfunction fsuccess(datadel){
var dat = JSON.parse(datadel);
starts throwing the error "SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data" Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question