hello,
I couldn't get the problem exactly,but here is a few things that can be of use.
To convert a string to uppercase you can use
$str=strtoupper($str);
and to lower case
$str=strtolower($str);
And here is aa function to get a part of string.
$str = substr($str_from_database,0,200);
$str now contains first 200 character of the $str_from_database value.
substr($string_variable_name,int start,int how_many)
and so on
$str_beyond_search=substr($str_from_database,200);
this means start to fetch by the 200st character to the end of string.
I hope it was useful for you.
Good luck...