How to find index of value in array?

Tell me, don't know what the problem is.
There is an array:
$arSt = array(
 '10068590' => 'S. T. ASTRA',

The data come from the database:
$str = 'S. t "ASTRA"' //string type is UTF-8

Search in the array:
array_search(trim($str), $arSt);
The answer is false.
In a similar situation, but strings without quotes, it works.
Tried to escape the quotes, to delete (could not delete str_replace('"', "", $str); is not working) nothing helps.
March 12th 20 at 08:41
1 answer
March 12th 20 at 08:43
yum@yum-desktop:~/Repos$ php test.php 
yum@yum-desktop:~/Repos$ cat test.php 
$string = 'S. t "ASTRA"';
$arSt = array(
 '10068590' => $string,

var_dump(array_search(trim($string), $arSt));

Works. Check the encoding of the file.
The file encoding is UTF-8. In the same file, a few of the same functions, but the data in them come without the quotation marks and everything works. - titus.Aufderhar commented on March 12th 20 at 08:46
@titus.Aufderhar, whether quotation marks and not "? Can I see more code that is not working? - kim_Bau commented on March 12th 20 at 08:49

Find more questions by tags PHP