خرید بک لینک

Vote count: -1

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?

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 24 اسفند 1394 ساعت: 11:40

صفحه بندی