I have a form which sends a string variable to a mysql select statement. One of the common strings that would be sent through the form is 'TvZ' .
In the mysql database, that particular column can hold the value 'TvZ', but it can also hold the reverse, equivalent value of 'ZvT'.
I would like to write an if statement that checks if the value of the submitted field is 'ZvT', and reassign the value to 'TvZ':
if ($value == "ZvT") { $value = "TvZ"; }
The problem is, ZvT can also be written zvt, Zvt, zvT, zVt, etc etc. However the $value == "ZvT" statement is case sensitive.
Is there an easy way to make the equivalent statement case insensitive?