B BIG LLC Active member Dec 10, 2021 #1 Bear with me, I am not a programmer's elbow. Can you set an array of arrays with template syntax alone? How would you call elements out of that array?
Bear with me, I am not a programmer's elbow. Can you set an array of arrays with template syntax alone? How would you call elements out of that array?
K Kirby Well-known member Dec 10, 2021 #2 Code: <xf:set var="$innerarray1" value="{{ ['foo', 'bar'] }}" /> <xf:set var="$innerarray2" value="{{ ['bat', 'baz'] }}" /> <xf:set var="$array" value="{{ [$innerarray1, $innerarray2] }}" /> Output baz: {$array.1.1}
Code: <xf:set var="$innerarray1" value="{{ ['foo', 'bar'] }}" /> <xf:set var="$innerarray2" value="{{ ['bat', 'baz'] }}" /> <xf:set var="$array" value="{{ [$innerarray1, $innerarray2] }}" /> Output baz: {$array.1.1}