I’m creating a php script for a charity client and I’m doing it for free. :o
Here’s the scenario.
They are a Radio Station in Ireland. Their broadcast system injects code into a popout player I’m creating.
The information it outputs includes current track info and past tracks info and this is where i need help.
The system outputs all the music track info and it outputs blank entries for every ad break, audio link or news break which results in some entries on the webpage being blank. You can see it in action here: (tried to post link but system wouldn’t let me.)
What I need to do is to create a PHP script that does the following:
#Create a list of variables for each piece of information.
#Then for each variable it needs to :
# Check if each variable is set
# If not do nothing and move on to the next variable
# If set then create a new variable with info that it been given. eg $RecentTrackTitle01
# It then needs to go through each of the original variables and do the same thing but add the next number to the new variable eg: $RecentTrackTitle02 $RecentTrackTitle03 $RecentTrackTitle04
I don’t know how to make the script create a list of 5 new variables, ignoring the blanks and moving on to the next with the appropriate next number in the sequence.
Here’s what I’ve got so far:
[php]
<?php $OCP_SPECIAL_SHOWTITLE = ''; $OCP_NOW_ITEMNAME = ''; $OCP_NEXT_ITEMNAME = ''; $OCP_PREVIOUS_ITEMNAME = ''; $OCP_PREV02_ITEMNAME = ''; $OCP_PREV03_ITEMNAME = ''; $OCP_PREV04_ITEMNAME = ''; $OCP_PREV05_ITEMNAME = ''; $OCP_PREV06_ITEMNAME = ''; $OCP_PREV07_ITEMNAME = ''; ?> <?php if (empty($OCP_PREVIOUS_ITEMNAME)) {} else { $RecentTrackTitle01 = &$OCP_PREVIOUS_ITEMNAME; } ?>[/php]
Any help greatly apprciated