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 # Time Memory Function Location 1 0.0001 364216 {main}( ) .../index.php:0 2 0.0027 455712 require( '/home/prototurk.com/public_html/app/controller/category.php' ) .../index.php:101 3 0.0065 474744 require( '/home/prototurk.com/public_html/app/view/article.php' ) .../category.php:34 4 0.0168 624792 parseTemplate( ) .../article.php:112 5 0.0168 624872 preg_replace_callback ( ) .../template.php:126 6 0.0168 625344 bb_json( ) .../template.php:126 7 0.0169 648720 require( '/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