Answer the question
In order to leave comments, you need to log in
How to get the first element of an array in smarty?
You need an analogue current($array);
or array_slice($array,0,1)
, even better, a link to an adequate guide to this stray. What would be the list of functions and designs.
do not offer smarty.net, the devil will break his leg there.
Answer the question
In order to leave comments, you need to log in
without entering the loop
{$array|@array_keys|@array_shift} - the first element of the array
{$array|@array_keys|@array_pop} - the last element of the array
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question