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 : Pull deliniated text strings into a "SELECT" statement in a form.
Categories : HTML and PHP, PHP, Strings Update Picture
Darrell Brogdon
Date : Jun 10th 1998
Grade : 1 of 5 (graded 1 times)
Viewed : 6921
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>



function textwrap will wrap text to any desired width using <BR>\n as the default line break. Default wrap width is 80 columns.
Categories : Strings, HTML and PHP, PHP
string justification align center text
Categories : Strings, PHP, HTML and PHP
Text Wrapping
Categories : PHP, HTML and PHP, Strings
Produces browser-safe strings while preserving HTML tags.
Categories : Strings, HTTP, PHP, HTML and PHP
PHP3: Formmail. Just a cgi formmail, but than in PHP. It is easy to use!
Categories : HTML and PHP, Email, PHP, Perl, HTML and PHP
Customizable encoding and decoding strings with security.
Categories : PHP, Strings, HTML and PHP
Parse string to find sub-string between two arbitrary strings
Categories : PHP, Strings, HTML and PHP, Arrays
Function to do live population of HTML's <Select> tag from a Table
Categories : PHP, MySQL, HTML and PHP, Databases
explode() and SQL blobs
Categories : General SQL, Strings, PHP, Databases
Automatically printing the contents of an sql table in MySQL.
Categories : MySQL, PHP, HTML and PHP, Databases
Check parameters validity. Paranoia was designed to check the validity of the parameters that a php page will receive after a form submission. It can be used to check the variables sent by POST or GET
Categories : Algorithms, HTML and PHP, PHP, Variables
Alternating background color for HTML table rows
Categories : PHP, Databases, MySQL, HTML and PHP
Create a link to check the accessibility of a PHP page using Bobby.
Categories : PHP, HTML and PHP
Random Image Display
Categories : PHP, Filesystem, Graphics, HTML and PHP
webcam cam view image ispy browser independant
Categories : Graphics, HTML, HTML and PHP, PHP