Hi!
Lets say I have an array full with 256 different numbers and want to find out if there is any period and if so, how long this period is.
example:
array (0,3,6, 7,1,3,6,2,5, 7,1,3,6,2,5, 7,1,3,6,2,5, 7,1,3,6,2,5 .....);
notice the period 7,1,3,6,2,5 --> period length would be "6". Notice also, that the first numbers "0,3,6" dont belong to a period.
How can you find this length of a period in PHP? Unfortunetly I havent found a function for this 😉 Thanks for helping!
Cheers,
Reiners
edit: the title says "period length of a number" to make the problem more clearly ... of course you can also implode the array to one number and than find the period if that make things easier 😉