I have list of records to display in one div and another div. Showing the first 10 records in one div and other following records in another div. i tried to get it but not showing the results
$results output:
Array ( [id] => 124 [number] => 330 [datetime] => 2021-12-12 15:30:00 )
Array ( [id] => 123 [number] => 123 [datetime] => 2021-12-12 12:30:00 )
Array ( [id] => 122 [number] => 143 [datetime] => 2021-12-12 12:00:00 )
Code
foreach ($results as $result) {
if condition to check first 10 rows to show
echo <div>first 10 records</div>
else{
echo <div>Following after 10 records to show</div>
}
}