{"id":611,"date":"2012-07-17T06:08:19","date_gmt":"2012-07-17T06:08:19","guid":{"rendered":"http:\/\/codeatelier.wordpress.com\/?p=77"},"modified":"2012-07-17T06:08:19","modified_gmt":"2012-07-17T06:08:19","slug":"smarty-functions","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/smarty-functions\/","title":{"rendered":"Smarty Functions"},"content":{"rendered":"<p><strong>Upper Case First Letter in\u00a0 Word<\/strong><\/p>\n<pre>{$city|capitalize}<\/pre>\n<p>Input<\/p>\n<pre>{assign var=\"name\" value=\"mugil\"}<\/pre>\n<p>Output<\/p>\n<pre>Mugil<\/pre>\n<p><strong><br \/>\nHow to Check for Variable in Array<br \/>\n<\/strong><\/p>\n<pre>\n {if in_array($current_item,$selected_array}\n<\/pre>\n<p><strong>How to Find Absolute Value<\/strong><\/p>\n<pre>\n  {$launchDate|abs ne 0}\n<\/pre>\n<p><strong>How to find substring in String <\/strong><\/p>\n<pre>\n  {$launchDate|substr:0:4}\n<\/pre>\n<p><strong>Using Foreach Loop<\/strong><\/p>\n<pre>\n  {assign var=\"Count\" value=1}\n  {foreach from=$arrTestimonials item=foo}\n   .\n   .\n   .\n   .\n   {assign var=\"Count\" value=$Count+1}\n   {\/foreach}    \n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Upper Case First Letter in\u00a0 Word {$city|capitalize} Input {assign var=&#8221;name&#8221; value=&#8221;mugil&#8221;} Output Mugil How to Check for Variable in Array {if in_array($current_item,$selected_array} How to Find Absolute Value {$launchDate|abs ne 0} How to find substring in String {$launchDate|substr:0:4} Using Foreach Loop {assign var=&#8221;Count&#8221; value=1} {foreach from=$arrTestimonials item=foo} . . . . {assign var=&#8221;Count&#8221; value=$Count+1} {\/foreach}<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[91],"tags":[],"class_list":["post-611","post","type-post","status-publish","format-standard","hentry","category-smarty"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/611","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/comments?post=611"}],"version-history":[{"count":0,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/611\/revisions"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}