Вопрос

I have this array {$man_data} which is structured like

10 > 'Text 8'
14 > 'Text 12'
24 > 'Text 13'

and {$entry.client_id} returns an integer (10, 14 or 24). I can't figure out how to call $man_data with key $entry.client_id?

I tried: {$man_data.{$entry.client_id}}, {$man_data.{entry.client_id}}, {$man_data.$entry.client_id}... any suggestions?

Это было полезно?

Решение

Have you tried:

{$man_data[$entry.client_id]}
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top