Sunday, January 2, 2011

Smarty array

Case: Want to make a loop but need to check "the value is an array" or "the value has a value". I'm using smarty code template (.tpl file). Keep having this problem so I job this down to myself

Reference
http://www.smarty.net/forums/viewtopic.php?t=9891

Rewrite it back
use count() -> http://uk.php.net/manual/function.count.php
or isset() -> http://uk.php.net/manual/en/function.isset.php
or empty() -> http://uk.php.net/manual/en/function.empty.php

Maybe later want to write how to create a loop from the array data... but quite lazy rite now

No comments: