v2.5.2
Giriş yap

PHP next() Fonksiyonu

PHP 4PHP 5PHP 7

Dizide sonraki elemanını bulmak için kullanılır.

Yapısı (Syntax)next ( array &$dizi ) : mixed

Parametreler

  • $girdi = $girdi array

    ( ! ) Notice: Undefined property: stdClass::$description in /home/prototurk.com/public_html/app/view/article-php.php on line 66
    Call Stack
    #TimeMemoryFunctionLocation
    10.0002360032{main}( ).../index.php:0
    20.0039451632require( '/home/prototurk.com/public_html/app/controller/category.php' ).../index.php:101
    30.0077470672require( '/home/prototurk.com/public_html/app/view/article.php' ).../category.php:34
    40.0185620720parseTemplate( ).../article.php:112
    50.0185620800preg_replace_callback ( ).../template.php:126
    60.0185621272bb_json( ).../template.php:126
    70.0187645688require( '/home/prototurk.com/public_html/app/view/article-php.php' ).../template.php:213

Dönen Değer

mixed - Dizinin bulunduğu konumun bir sonrasında eleman varsa o elemanın değerini döndürür, yoksa false döner.

NOT
Bu işlev mantıksal false değeriyle dönebileceği gibi false olarak değerlendirilebilecek mantıksal olmayan bir değerle de dönebilir. Bu işlevden dönen değeri sınamak için === işlecini kullanınız.

Örnekler

next() Fonksiyon Örneği

$sehirler= array('ankara', 'istanbul', 'mugla', 'eskisehir');

$sonuc = current($sehirler);  // $sonuc = 'ankara';
$sonuc = next($sehirler);      // $sonuc = 'istanbul';
$sonuc = next($sehirler);      // $sonuc = 'mugla';

serkanosna
1784 gün önce eklendi - 2199 kez görüntülendi.
Github'da Düzenle
Önceki current() Sonraki prev()