Convert string to array in template

Status
This content is read-only, or is not open for further replies.

Azzl

Guest
offline
How would I convert this string to an array within a template?

{{ $records.connectionString }} which equals "0:0:991:1000 0:1:235:1"

I'd like to convert the string above to an array (which is broken up by " " and ":", then loop through it and only output the third value 991 and 235 on their own lines.

EX:
991
235

Also note: Apologies if this is in the wrong section.

Continue reading...
 
Liked by:
Status
This content is read-only, or is not open for further replies.
Top Bottom