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 361248 {main}( ) .../index.php:0 2 0.0037 452848 require( '/home/prototurk.com/public_html/app/controller/category.php' ) .../index.php:101 3 0.0074 471880 require( '/home/prototurk.com/public_html/app/view/article.php' ) .../category.php:34 4 0.0136 621928 parseTemplate( ) .../article.php:112 5 0.0136 622008 preg_replace_callback ( ) .../template.php:126 6 0.0136 622480 bb_json( ) .../template.php:126 7 0.0137 645856 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