I know and already know how to use the $.getJSON
method of jQuery returning the data that is returned with PHP by json_encode()
.
It turns out that in the project I'm developing, I use Template (PHP) for better organization in HTML and PHP. And, for example, I'm in the index of my site and click on a link (which does the function for $.getJSON
) that is directed to myite.com/Igor. In this folder (/ Igor) there is an index.php of which is the file responsible for defining the variables and displaying the template (HTML).
In this case, can you use $.getJSON
to return such data?
If not, how to proceed in this case?
Thank you!