{"id":5979260,"date":"2015-04-04T17:50:05","date_gmt":"2015-04-04T17:50:05","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/not-working-function-statement\/"},"modified":"2016-08-24T14:24:12","modified_gmt":"2016-08-24T14:24:12","slug":"not-working-function-statement","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/not-working-function-statement\/","title":{"rendered":"Not working function statement"},"content":{"rendered":"<p>Hello<\/p>\n<p>Thank you for awesome plugin to the wordpress. But I came up with the problem using this plugin. The problem is, whenever I want to to declare some function for example: [insert_php]<br \/>\n$val = &#8216;hello&#8217;;<br \/>\nfunction sayval($val)<br \/>\n{<br \/>\n   echo &#8220;value is $val&#8221;;<br \/>\n}<br \/>\nsayval($val);<br \/>\n[\/insert_php]<br \/>\nI will give me this error:&#8221;Fatal error: Cannot redeclare sayval() (previously declared in C:\\Program Files (x86)\\EasyPHP-DevServer-14.1VC9\\data\\localweb\\wordpress_osada\\wp-content\\plugins\\insert-php\\insert_php.php(48) : eval()&#8217;d code:3) in C:\\Program Files (x86)\\EasyPHP-DevServer-14.1VC9\\data\\localweb\\wordpress_osada\\wp-content\\plugins\\insert-php\\insert_php.php(48) : eval()&#8217;d code on line 6&#8243;. The solution that I found is that I just remove the code from function and it works, but I am not able to use php function, which I need to use. I checked that I declared the function only once. Could you please help me ?<br \/>\nThank you,<br \/>\nMartin<\/p>\n<p>https:\/\/wordpress.org\/plugins\/insert-php\/<\/p>\n","protected":false},"template":"","class_list":["post-5979260","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5979260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5979260\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5979260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}