$string = 108/1727.wma|108/1734.wma|108/1725.wma|108/1737.wma|108/1732.wma|108/1730.wma|108/1738.wma
I have a form which contains a drop down with each of the above in OPTIONS
<OPTION>108/1727.wma</OPTION> <OPTION>108/1734.wma</OPTION> ect..
You get the drift, anyway, when they select one and submit, it needs to remove their selection from $string
So, if they selected <OPTION>108/1727.wma</OPTION> then the string would need to be modified to
$string = 108/1734.wma|108/1725.wma|108/1737.wma|108/1732.wma|108/1730.wma|108/1738.wma
That bit is simple so far right? well, the problem is, those pipes need to be in the correct places. The string can never start with a pipe, and it can never end with a pipe
Now if you have thought ahead, you will see that if they submit to delete either
$string will be left with either a pipe at the start or end of the $string.
How can I get around this. Its a bit messy, but I've been working on this for over an hour and cant get my head around it