Does anyone know how I would go about searching through an array for repeated values and return the one with the smaller index? For example:
I need a function that will return "1" if I do findrepeatlowerindex("joe");
In addition, I would like it to not be case sensitive (
), if at all possible.
So
findrepeatlowerindex("joE"); would return "1", too.
Any suggestions on how I could go about doing this? Or if you are really cool you could write the function for me
.
Thanks,
scem0
Code:
$array[0]= "timmy";
$array[1] = "joe";
$array[2] = "elmo";
$array[3] = "clarissa";
$array[4] = "joe";
In addition, I would like it to not be case sensitive (
So
Code:
$array[0]= "timmy";
$array[1] = "joe";
$array[2] = "elmo";
$array[3] = "clarissa";
$array[4] = "JoE";
Any suggestions on how I could go about doing this? Or if you are really cool you could write the function for me
Thanks,
scem0