Reputation: 29
I started to wonder that is it possible to create a class in PHP, for instance one containing a books title, author and publisher, and then using that class in AJAX?
To clarify. By using I meant that is it possible to access the variables in that class or even use the functions created in php, such as setters/getters.
Upvotes: 0
Views: 53
Reputation: 964
What you can do is create a separate class file and a function that will trigger the methods of this class. With ajax you will send requests for that file functions and then it will call the method of the class you need.
Upvotes: 2