I am working on taxi app, after ride completes i have to draw map for which i use google map apis. let suppose my way-points are
array($coordinates1,$coordinates2,$coordinates3,$coordinates4,$coordinates5,$coordinates6,.........,$coordinates40)
the problem is that google map api accept only maximum of 23 way-points, for this purpose I have to skip many coordinates to pass, here my idea is to unset elements of array with equal intervals so that the route remain same. Please someone guide me how to remove many number of elements from an array with equal interval, just like i need 23 and total elements are 40 so that i need like
array($coordinates1,$coordinates4,$coordinates7,$coordinates9,$coordinates13,$coordinates16,.........,$coordinates39)