View Single Post
Old 02-20-2013, 03:18 AM   PM User | #2
Coastal Web
Regular Coder

 
Coastal Web's Avatar
 
Join Date: Oct 2004
Posts: 225
Thanks: 12
Thanked 3 Times in 3 Posts
Coastal Web is an unknown quantity at this point
I'm not quite sure how what ou posed would have worked.
It would need to look something like this:

PHP Code:
echo "<option value='$val_name'" . ($selected == 'selected' 'selected=\'selected\'' '') . ">$val_val</option>"
Check this out for more on shorthand if statements.
http://davidwalsh.name/php-ternary-examples
__________________
Need a way to drive traffic to your new site?
==> Check out HelpMyHits.com!
Coastal Web is offline   Reply With Quote
Users who have thanked Coastal Web for this post:
durangod (02-20-2013)