I have this foreach loop in PHP where i loop through some array results:
foreach(array_reverse($output) as $row)
but i want to be able to limit the number of results so i can display the results on separate pages
i have tried using the function array_slice in PHP but had no luck, using the below code i just get no results returned
foreach(array_reverse(array_slice($output),0,5) as $row)
how can i limit the results returned in the array?
array_sliceis misplaced,array_slicetakes 3 arguments.LIMITinsteadarray_slice() expects at least 2 parameters, 1 given in.... You can see it here: codepad.viper-7.com/g00O6N