I need to create a JavaScript variable to compare to another variable.
- One of those variables comes from a php file. So i created a simple php array and used
json_encode($array)to convert it to json. - Using ajax/getJSON, how do I grab that value, put it in a variable, and use it for logical testing?
I've been seeing some examples of getJSON but they are all complex arrays where mine is just a single value. Thanks