This is probably relatively easy to do, but I'm new to the branch and I'm upset.
I am adapting the code from this answer: stack overflow
an array is created in PHP in this format:
$link[] = array(
'link' => 'http://example.org',
'title' => 'Link Title',
'display' => 'Text to display',
);
Then, through twig, I add html to it before it is taken:
<ul class="conr">
<li><span>{{ lang_common['Topic searches'] }}
{% set info = [] %}
{% for status in status_info %}
{% set info = info|merge(['<a href="{{ status[\'link\'] }}" title="{{ status[\'title\'] }}">{{ status[\'display\'] }}</a>']) %}
{% endfor %}
{{ [info]|join(' | ') }}
</ul>
But I get:
Errno [8] Converting an array to a string in F: \ localhost \ www \ twig \ include \ lib \ Twig \ Extension \ Core.php on line 832
Fixed when I delete this line but not showing:
{{ [info]|join(' | ') }}
Any ideas on how I can blow this properly?
** update **
Using the Twig dump function, it returns nothing. It doesn't seem to even load it into an array in the first place. How to load information into a new array.