I have a big array which i need to display the latest 10 items in it only. what is the best php code to do that?
thanks
I have a big array which i need to display the latest 10 items in it only. what is the best php code to do that?
thanks
Use array_slice
$printing = array_slice($array, -10);
print_r($printing); //or however you want to print it.