WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Allows you to parse a deliniated string and put the individual fields in a SELECT option in a form
Categories : HTML, PHP, Strings Update Picture
Darrell Brogdon
Date : Jan 17th 1999
Grade : 2 of 5 (graded 1 times)
Viewed : 8701
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Darrell Brogdon
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

<?

/*
$string: the deliniated string you wish to parse and place as an option in your SELECT statement
$delimiter: the delimiter you use to separated the fields in your string. Commas (,)
or Pipes (|) are common delimiters.
*/

Function select_parse($string, $delimiter) {
$options = split( "[$delimiter]+", $string );

for( $i = 0; $options[$i]; $i++ ) {
echo "<option> $options[$i]\n";
}
}

$strText = "One,Two,Three,Four";
?>

<FORM>
<SELECT NAME="test">
<? select_parse($strText, ","); ?>
</SELECT>
</FORM>



Query2Report : Generating Html, Pdf and Csv Reports from SQL Query
Categories : PHP, PHP, HTML, PDF, Excel
string justification align center text
Categories : Strings, PHP, HTML and PHP
Text Wrapping
Categories : PHP, HTML and PHP, Strings
Function to create a separated list
Categories : PHP, Arrays, Strings
How to know which input button of type image was pressed in a form with multiple image buttons (_x and _y) in PHP?
Categories : PHP, Variables, HTML
How to preset a text string in a textarea input field
Categories : HTML, HTML and PHP, PHP, Beginner Guides
Making sure a string containes only digits or no digits.
Categories : Strings, PHP, Regexps
How to control the number of decimal places when outputting numbers.
Categories : PHP, Strings, Variables
How to use regular expressions to get the list of links from an HTML page
Categories : PHP, Regexps, HTML, HTML and PHP
Produces browser-safe strings while preserving HTML tags.
Categories : Strings, HTTP, PHP, HTML and PHP
How to get the source of a site into an array.
Categories : Arrays, HTML, PHP
BBCode Formatting String
Categories : PHP, HTML, Regexps, Arrays
Filter - A simple class that lets you use multiple functions to create custom filters.
Categories : PHP, PHP Classes, Strings
Paginator - a class that can help you to split MySQL database query result sets to pages.
Categories : MySQL, Databases, HTML, PHP
Browser Detecor Class
Categories : PHP Classes, PHP, HTML