David Nelson Posted May 3, 2008 Share Posted May 3, 2008 Hey guys, I'm working on a project that uses the YouTube API. It takes advantage of php, html, xml, etc.. but I'm looking to make a php modification to filter through some results. Basically the way it prints each entry is it has a set template like this {section loop=$videos name=i} <a href="http://www.youtube.com/watch?v={$videos.id}" target="I1">{$videos.title}</a> {$videos.duration} {sectionelse} --- So as you can see it's making calls that gets data from the API. You can see "{$videos.duration}" above. This prints the duration of the video in seconds. What I want to do is make it check {$videos.duration} to see if its <30 or >600 seconds - if {$videos.duration} is less/greater than those numbers, It should NOT print it on the page. I'm pretty novice with php so I was wondering what the best way for me to do this is. This may be confusing as to what I'm trying to do here, so if you need clarification please ask. :-) Thanks! David Link to comment https://forums.phpfreaks.com/topic/103969-dont-print-results-if-php-call-is-in-given-number-bracket/ Share on other sites More sharing options...
David Nelson Posted May 3, 2008 Author Share Posted May 3, 2008 Any ideas? I'm using smarty, no data is stored in MySQL, it's all "on-the-fly" generated API data. Link to comment https://forums.phpfreaks.com/topic/103969-dont-print-results-if-php-call-is-in-given-number-bracket/#findComment-532303 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.