I have the following array:
$array = array("6", "66", "67", "68", "69", "697", "698", "699");
I have the following strings:
"69212345", "6209876544", "697986546"
I want to find the array element which matches longest part from begiing of the string, i.e.
for "69212345" array value "69" will be selected.
for "6209876544" array value "6" will be selected.
for "697986546" array value "697" will be selected.
Please help me how can I achieve this?
