I have some GET variables coming in that I need to change to words If $_GET = e I need it to say BIG if $_GET = f i need it to say Yellow is there a simple concise way to write this function?
you don't really need a function to do this, you can just use an array with the letters as key, and the words as value: $words = array ( 'e' => 'BIG', 'f' => 'Yellow' ); if ( array_key_exists ( $_GET['myvar'], $words ) ) { echo $words[ $_GET['myvar'] ]; } PHP:
you are all over the boards. thanks to you i understand array's alot better. thanks again....what is this the 20th time now. LOL