AH-SID
if I have an array like:
{% set array = [a, d, c, b, f, e] %}
What should I do to make that array become:
{% set array = [a, b, c, d, e, f] %}
[VIKRAM]
AH-SID just swap them...
$var1 = $array[2];
$ var2 = $array[5];
$array[2]= $array[4];
$array[4]= $var1;
$array [5]= $array [6];
$array[6]= $var2;
Copy code
AH-SID
[VIKRAM] Hm.. I don't know about PHP.
I mean, is anyway in twig to sort an array by alphabetic?
Lordeagle
Graham After editing twig in code editor i usually get alert that one thing or the other went wrong. should I use the code editor?