I have very simple question about PHP. (Please don't -1 first.)
Imagine we have this array :
Array {
[1] => Hi
[3] => Hey
[5] => You
[9] => hello
[13] => yes
[66] => Test
[86] => Test2
[96] => Test3
}
(it is not SORTed).
So , I want 2 things :
First, find how many values are in this array (in this one, it is 8);
Second, IF it has more than 5 Values, Then Just return 5 First values (as i said it's not sorted in array-numbers , SO , I just want to return 5 First values )
How can we do it in PHP ?
(( I am so sorry Because i am SO beginner and can't find solution in other questions ))