Hi,
Given a string $txt and an array of strings $txt_array
what would be the best/fastest way to search in _insensitive_ case if $txt
is in $text_array and, if it is, where is it?
Because I want to use the array with an ID
Something like,
$text_array[1] = "Hello A";
$text_array[2 = "Hello B";
$text_array[9] = "Hello C";
$text_array[15] = "Hello D";
and
$text = "hello c";
I want to return that it was found in text_array and that the number is '9'.
Are there any 'special' characters I need to watch out for?
Could that be done?
Regards.
Sims
Given a string $txt and an array of strings $txt_array
what would be the best/fastest way to search in _insensitive_ case if $txt
is in $text_array and, if it is, where is it?
Because I want to use the array with an ID
Something like,
$text_array[1] = "Hello A";
$text_array[2 = "Hello B";
$text_array[9] = "Hello C";
$text_array[15] = "Hello D";
and
$text = "hello c";
I want to return that it was found in text_array and that the number is '9'.
Are there any 'special' characters I need to watch out for?
Could that be done?
Regards.
Sims
Comment