PHP bir dizi bazı öğeleri görüntülemek

1 Cevap php

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?

teşekkürler

1 Cevap

Kullan array_slice

$printing = array_slice($array, -10);

print_r($printing); //or however you want to print it.