Re: Splitting a string and placing the contents into a form pulldown

From: Date: Fri, 07 Jun 2002 01:30:47 +0000
Subject: Re: Splitting a string and placing the contents into a form pulldown
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-19663@lists.php.net to get a copy of this message
In article <000001c20db9$e864dbb0$f7fea8c0@chris>, chris@planetoxygene.com says... > Hi there everyone, > > I have this pattern in a mysql db: > > Deluxe double =A3165.00 prpn<br><br>Single =A3128.00 > prpn<br><br>Triple > =A3229.00 prpn > > What I need to do is to remove the <br> but where there <br>'s are > should be the end of a string, so in this case I should have an Array > (?) of 3 items. > > My question is, how, from this 1 line, can I split it into 3 options and > place it in a pulldown box in my form? I have no choice but to use the > info in this format as it is for a company who displays this information > in a webpage, (hence the <br>'s) but need the same info to populate a > dropdown menu for selection. Sigh, they never make it easy for me :-) > > I know what needs to be done, but don't know how to do it :-( > > Thanks for everything, it's really appreciated. str_replace to replace your double tags with a single char, then explode() into an array. Fro mthe array you should be able to fairly simply create a SELECT list. -- David Robley Temporary Kiwi! Quod subigo farinam

« previous php.db (#19663) next »