M
M
Maxim Timofeev2018-01-11 17:20:30
Smarty
Maxim Timofeev, 2018-01-11 17:20:30

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

1 answer(s)
M
Mikhail Alekseev, 2018-11-12
@webinar

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 question

Ask a Question

731 491 924 answers to any question