use explode() by doing something in the gist of:
$options = explode('<br><br>', $line);
echo '<select><option>'.join('</option><option>',
$options).'</option></select>';
-----Original Message-----
From: Chris Payne
To: [EMAIL PROTECTED]
Sent: 6/6/02 5:25 PM
Subject: [PHP-DB] Splitting a string and placing the contents into a form
pulldown
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.
Chris
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.370 / Virus Database: 205 - Release Date: 6/5/2002
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php