Clean form input to lowercase alphabetical using php

AnnaG

New Member
I have a simple php file with a GET from a form to throw up some files from a directory. Quite simple code but I just need to strip from the string ANY characters that are NOT lowercase alpha. How would I go about doing that? (I'm a novice).Here 'tis:\[code\]<?php $text = $_GET['text_string']; ?><form method="GET" action="index.php">Please enter some letters: <input type="text" name="text_string" value=""/> and hit <input type="submit" value="http://stackoverflow.com/questions/3724043/enter" /></form><?php /* Split characters into an array */ $array = str_split($text); ?><?php foreach($array as $char) : ?> <img src="http://stackoverflow.com/questions/3724043/glyphs/<?php print ($char); ?>.jpg"/><?php endforeach ; ?>\[/code\]Thanks!
 
Back
Top