use explode() by doing something in the gist of:

$options = explode('<br><br>', $line);
echo '<select><option>'.join('</option><option>',

-----Original Message-----
From: Chris Payne
Sent: 6/6/02 5:25 PM
Subject: [PHP-DB] Splitting a string and placing the contents into a form

Hi there everyone,

I have this pattern in a mysql db:

 Deluxe double 165.00 prpn<br><br>Single 128.00 prpn<br><br>Triple
229.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.


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.370 / Virus Database: 205 - Release Date: 6/5/2002

PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to