{"id":7188,"date":"2014-05-27T09:05:38","date_gmt":"2014-05-27T09:05:38","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/05\/27\/smarty-extract-first-word-of-variable-collection-of-common-programming-errors\/"},"modified":"2014-05-27T09:05:38","modified_gmt":"2014-05-27T09:05:38","slug":"smarty-extract-first-word-of-variable-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/05\/27\/smarty-extract-first-word-of-variable-collection-of-common-programming-errors\/","title":{"rendered":"Smarty: extract first word of variable-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m using smarty template engine to implement my templates for a website.<\/p>\n<p>I have to extract the first word of a varible, e.g. the variable &#8220;$a&#8221; with the content &#8220;hello world foo &#8230;&#8221; must be seperated into two variables: &#8220;$b&#8221; = &#8220;hello&#8221; and &#8220;$c&#8221; with the rest (which can be of different size) of &#8220;$a&#8221;, so &#8220;world foo &#8230;&#8221;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m using smarty template engine to implement my templates for a website. I have to extract the first word of a varible, e.g. the variable &#8220;$a&#8221; with the content &#8220;hello world foo &#8230;&#8221; must be seperated into two variables: &#8220;$b&#8221; = &#8220;hello&#8221; and &#8220;$c&#8221; with the rest (which can be of different size) of &#8220;$a&#8221;, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7188","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7188"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7188\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}