Bir "sayı" özelliği var hepsi de ben, bir kayıt kümesi döngü çalışıyorum. Ben 3 ardışık kayıtları, örneğin 6, 7 ve 8 olup olmadığını kontrol etmek için çalışıyorum.
Ben aşağıda kod ile, son aşamada olsa duvara vurmak neredeyse orada olduğumu düşünüyorum - Herhangi bir yardım büyük olurdu!
$nums = array();
while (count($nums <= 3))
{
//run through entries (already in descending order by 'number'
foreach ($entries as $e)
{
//ignore if the number is already in the array, as duplicate numbers may exist
if (in_array($e->number, $num))
continue;
else
{
//store this number in the array
$num[] = $e->number;
}
//here i need to somehow check that the numbers stored are consecutive
}
}