Ask the php array to display the problem cyclically on the Smarty Template page $ row2 = explode ('______', $ conne-& gt; getRowsArray ($ SQL); $ smarty-& gt; assign (array (& quot; array3 & quot; = & gt; $ row, & ask the php array to be displayed cyclically on the Smarty template page
$ Row2 = explode ('______', $ conne-> getRowsArray ($ SQL ));
$ Smarty-> assign (array ("array3" => $ row, "array4" => $ row2 ));
Array defined here
{% Foreach item = I from = $ array3 %}
{% Foreach item = j from = $ array4 %} // here the loop array starts. in this way, how can we loop through the array content.
{% If $ I! = "Guid" %}
{% $ I | replace: "_": "" %}
(Chinese) (ENGLISH)
{%/If %}
{%/Foreach %}
{%/Foreach %}
------ Solution --------------------
Discussion
{% Foreach item = j from = $ array %} // here the loop array starts. in this way, how can we loop through the array content.
------ Solution --------------------
It indicates that your current $ j is a string, so you need to {% $ j % }.
------ Solution --------------------
Discussion
The value cannot be read. all output values are uppercase A {% $ j [0] %}
------ Solution --------------------
You can now echo on the php page'
'; Print_r ($ array); exit; check the structure and call it in smarty according to the structure. if you want to send the echo result, I will help you.
------ Solution --------------------
Haha, $ j is the string Array.
------ Solution --------------------
You can call
{% $ J [0]. guid %}. In other cases, you need to study more and practice more, so that you can easily find the rule.
------ Solution --------------------
The above is incorrect.
Yes {% $ j. guid %}