DeyBwah Posted May 21, 2011 Share Posted May 21, 2011 Hey everyone. I have some experience with PHP and can easily modify existing code, but seem to have trouble writing the logic from scratch. Situation: I'm using this Jquery slider ( http://mine.tuxfamily.org/?p=74#more-74 ) and would like to populate the slides with data coming from an XML file. The data will be text, images(URIs), and links to buy. The thing is, each slide will hold 4 items, and then I want to somehow using PHP logic, allow the code to generate the next slide... In other words, how would I code it so that after 4 entries, it creates a new slide? I'm imagining a For loop + SimpleXML functions... but just kind of fumbling in the dark here. Any direction or guidance is greatly appreciated! Kind regards, Dey Link to comment https://forums.phpfreaks.com/topic/237067-need-help-with-xml-data-to-populate-tables/ Share on other sites More sharing options...
silkfire Posted May 21, 2011 Share Posted May 21, 2011 Is your problem how to layout the XML file? Does the jQuery plugin read raw XML or JavaScript objects/arrays? To make it create an extra slide if items > 4 that's something you have to write in jQuery. Link to comment https://forums.phpfreaks.com/topic/237067-need-help-with-xml-data-to-populate-tables/#findComment-1218512 Share on other sites More sharing options...
DeyBwah Posted May 21, 2011 Author Share Posted May 21, 2011 Is your problem how to layout the XML file? Does the jQuery plugin read raw XML or JavaScript objects/arrays? To make it create an extra slide if items > 4 that's something you have to write in jQuery. I know how to layout the XML file. The problem begins right after that. The jQuery script that I'm using doesn't have any XML reading functionality. It was built to be hard coded. I was picturing that some PHP functions/code would allow me to basically create the logic to print out my the HTML/jQuery code and populate the slides. Are you saying I need to do this in jQuery? I hope not, I'm even less versed in jQuery/JavaScript. :/ Please, say it ain't so! Link to comment https://forums.phpfreaks.com/topic/237067-need-help-with-xml-data-to-populate-tables/#findComment-1218515 Share on other sites More sharing options...
silkfire Posted May 21, 2011 Share Posted May 21, 2011 I couldnt really understand that jQuery code; how does the plugin read in the items? If you can't answer that question I can't help you... Link to comment https://forums.phpfreaks.com/topic/237067-need-help-with-xml-data-to-populate-tables/#findComment-1218526 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.