Help with Loading JSON into PHP with ajax/jquery
I am trying, as a new developer, wrap my head around the best approach to load a JSON file, create some sort of template with variables or placeholders, without using jquery to build DOM elements, since its a complex div.
To make it more complicated I would like to have a onClick event to a set of tabs in this case dates (since this is a event calendar) and have it load 5 events for each date, without reloading the page, which is where ajax comes in.
Here is my JSON function:
Any help in getting this working or some way help me understand the best way to do this, would be greatly appreciated.
array('id'=>'1', 'title'=>'My Title'),
array('id'=>'2', 'title'=>'My Title2'),
array('id'=>'3', 'title'=>'My Title3'),
array('id'=>'4', 'title'=>'My Title4'),
array('id'=>'5', 'title'=>'My Title5')
if $foo is a global, tell php so, otherwise, delclare $foo first, then assign the events array to foo...
Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread