|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
MrVon Smarty Rookie
Joined: 08 Jul 2011 Posts: 15
|
Posted: Fri Feb 10, 2012 1:50 am Post subject: Count length of array key? |
|
|
{$smarty.post.email} outputs "john@yahoo.com"
{$smarty.post.email|count} outputs "1" instead of "14" - string length.
{$smarty.post.email[0]|count} outputs "1" as well.
How can i find length of key named "email"? |
|
Back to top |
|
douglassdavis Smarty Junkie
Joined: 21 Jan 2008 Posts: 541
|
Posted: Fri Feb 10, 2012 4:57 am Post subject: Re: Count length of array key? |
|
|
count is for counting the number of elements in an array.
strlen gets the length of a string |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|