D0000D sent to the forum section--------------------------------------------- -------------
No.0 plate dedecms
D8888D post title------------------------------------------------- ----------
smarty loop array problem
D8888D main post content------------------------------------------------- ----------
How to use Smarty's foreach to get the value inside? Do we have to use section ??? Array( [productID] => 1
[productName] => Nokia 6220c
[attribute] => Array( [Brand] => Array( [1] => name2454542177524121 ))
)
Copy code
Let me answer
D8888D reply content------------------------------------------------- ----------
Isn’t it also possible to use the foreach statement in smarty?
D8888D reply content------------------------------------------------- ----------
Isn’t it also possible to use the foreach statement in smarty?
Fising published on 2009-6-14 21:32 [url=http://www.phpchina.com/bbs/redirect.php?goto=findpost&pid=1067324&ptid=127997]Link mark[img]http://www.phpchina .com/bbs/images/common/back.gif[/img][/url]
Product name:
No....
D8888D reply content------------------------------------------------- ----------
Product name:
No....
A corpse was published on 2009-6-14 21:36 [url=http://bbs.phpchina.com/redirect.php?goto=findpost&pid=1067332&ptid=127997]Link tag [img]http://bbs.phpchina. com/images/common/back.gif[/img][/url]
How is it possible
D8888D reply content------------------------------------------------- ----------
I tried it
Attachment: Your user group cannot download or view attachments
D8888D reply content------------------------------------------------- ----------
Report an error?
D8888D reply content------------------------------------------------- ----------
If no error is reported, the above is the result. The product name is 1 .....
D8888D reply content------------------------------------------------- ----------
I X, it’s weird
D8888D reply content------------------------------------------------- ----------
Check carefully, there must be a typo somewhere. foreach is specifically designed to deal with this problem.
D8888D reply content------------------------------------------------- ----------
Array ( [0] => Array ( [propertyName] => brand ))
You said it's for this kind of thing?
This kind comes from a two-dimensional array, and the one I’m talking about now is a one-dimensional associative array