what i Need:
string as follows:
["Product_Name"]=> string(362) "Top End Transport System,Band Combiner Devices,Our Mid Level Transport System,The Introductory Transport System,In-Line Amplification Systems,Intelligent Ethernet Access System,Ethernet Access System,Intelligent Ethernet Access System (Ieas 05),Intelligent Ethernet Access System (Ieas 06),Intelligent Ethernet Access System (Ieas 03),Ethernet Aggregation Device" }
- Im using php slice function in such manner so that i should validate string till 5 string.
- ex: Top End Transport System, ur Mid Level Transport System,The Introductory Transport System,In-Line Amplification Systems,Intelligent Ethernet Access System.
- i need till first five string.
- i have refer article http://twig.sensiolabs.org/doc/filters/split.html
here is twig code:
{% set foo = item.Product_Name|split(',') %}
{{ dump (foo) }}
{% for i in item.Product_Name|slice(0, 5) %}
{{ dump(i) }}
{% endfor %}
- slice function is for array so , please tell how to convert product name to array in twig