Case insensitive needle in haystack |
[eluser]whiteae[/eluser]
So I'm trying to get the session variable to be the default value in my dropdown list. It works unless the user types it all lowercase in which the data is not. So if a user types in k&n, it doesn't recognize it in the array because the data in the array is K&N. What is the easiest way to accomplish this? Here is the code I have now.. Code: <?php echo form_open('items/index'); ?>
[eluser]DarkManX[/eluser]
http://www.php.net/manual/en/function.strtolower.php
[eluser]whiteae[/eluser]
I tried using that and I couldn't get it to work for some reason. I know to compare them by that, but can't figure out if the lower case item is in the lower case array item.
[eluser]DarkManX[/eluser]
dont get where you compare them. you just post the form. post the code which campares the input-stuff.
|
Welcome Guest, Not a member yet? Register Sign In |