Technique

From: Date: Mon, 31 Jul 2000 11:54:03 +0000
Subject: Technique
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9315@lists.php.net to get a copy of this message
Hey all -- I've got a question more of technique than hard knowledge. This is what I've got.. I've got a form that has all types of fields....what I would like to do is have a corresponding checkbox for all of those fields. The purpose is, when a field that is listed doesn't completely cover what the user wants, they can click the checkbox. When a checkbox is clicked for that field, I want the field that they selected displayed along with a "See Additional Notes". I'm having a little trouble figuring out a "clean" way of accomplishing this -- any suggestions? John -----Original Message----- From: Ori Staub [mailto:ori@*NO-SPAM*chikki.net] Sent: Monday, July 31, 2000 7:29 PM To: php-general@lists.php.net Subject: [PHP] Regular expressions I need help with regular expressions. I need to find the occurrence of characters in a string, however, for simplicity, I would like to list them by "what is allowed". I couldn't get it to work using eregi(), so i devised this little function, but there must be an easier way! - please help $legal_char_class = "[a-zA-Z0-9\.]"; $length = strlen($name); for ($i=0; $i <= $length - 1 ; $i++){ $text_pos = $length - $i; // break up string into array and test each character $name_array[$i] = substr($domain_name, -$text_pos,1); if (!ereg($legal_char_class,$name_array[$i])){ $error = true; } }// end for loop -- Ori Staub ori@_NO_SPAM_chikki.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#9315) next »