NOVINKA: Najžiadanejšie rekvalifikačné kurzy teraz s 50% zľavou + kurz AI ZADARMO. Nečakaj, táto ponuka dlho nevydrží! Zisti viac:

PHP - End

Trieda

Koreň \ Bez triedy

Metóda - End

Moves the internal pointer of a given array to the last item and returns the value of the last item.

Procedurálne

  • function End () : void

Parametre

Žiadne

Mávratovej hodnoty

Vracia:

The value of the last item in a given array. false is returned if the given array is empty.

Príklady

This example outputs 5.

<?php

$array = array('1', '2', '3', '4', '5');
echo end($array);

Súvisiace manuály

        Aktivity