v2.5.2
Giriş yap

PHP end() Fonksiyonu

PHP 4PHP 5PHP 7

Dizinin son elemanını seçmek için kullanılır

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

Parametreler

  • $girdi = $girdi mixed

    ( ! ) Notice: Undefined property: stdClass::$description in /home/prototurk.com/public_html/app/view/article-php.php on line 66
    Call Stack
    #TimeMemoryFunctionLocation
    10.0002360208{main}( ).../index.php:0
    20.0033451808require( '/home/prototurk.com/public_html/app/controller/category.php' ).../index.php:101
    30.0214470840require( '/home/prototurk.com/public_html/app/view/article.php' ).../category.php:34
    40.0313620888parseTemplate( ).../article.php:112
    50.0313620968preg_replace_callback ( ).../template.php:126
    60.0313621440bb_json( ).../template.php:126
    70.0314644816require( '/home/prototurk.com/public_html/app/view/article-php.php' ).../template.php:213

Dönen Değer

mixed - Dizi boşsa false döner, yoksa son elemanın değerini döndürür.

Örnekler

end() Fonksiyon Örneği

$sehirler= array('ankara', 'istanbul', 'eskisehir');
echo end($sehirler); 
// Çıktı : eskisehir

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