{"id":6769701,"date":"2015-11-20T10:43:14","date_gmt":"2015-11-20T10:43:14","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/parse-error-syntax-error-t_string-evald-code\/"},"modified":"2016-08-30T20:29:02","modified_gmt":"2016-08-30T20:29:02","slug":"parse-error-syntax-error-t_string-evald-code","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/parse-error-syntax-error-t_string-evald-code\/","title":{"rendered":"Parse error: syntax error (T_STRING): eval()&#039;d code"},"content":{"rendered":"<p>Hello,<\/p>\n<p>I&#8217;m getting an error message:<\/p>\n<p><code>Parse error: syntax error, unexpected &#039;bathrooms_panel&#039; (T_STRING) in \/path\/to\/site\/wp-content\/plugins\/insert-php\/insert_php.php(48) : eval()&#039;d code on line 1<\/code><\/p>\n<p>I am trying to use this to insert php to pull custom fields into variables to use in the tabby tabs plugin.<\/p>\n<p>This is the code I am trying to use:<\/p>\n<pre><code>[insert_php]\n$plumbingtitle = get_field(&#039;plumbing_panel_title&#039;);\n$plumbingpanel = get_field(&#039;plumbing_panel&#039;);\n$boilerstitle = get_field(&#039;boilers_and_heating_panel_title&#039;);\n$boilerspanel = get_field(&#039;boilers_and_heating_panel&#039;);\n$gastitle = get_field(&#039;gas_works_panel_title&#039;);\n$gaspanel = get_field(&#039;gas_works_panel&#039;);\n$bathroomstitle = get_field(&#039;bathrooms_panel_title);\n$bathroomspanel = get_field(&#039;bathrooms_panel&#039;); \n\necho do_shortcode(&#039;[tabby title=&quot;&#039; . $plumbingtitle . &#039;&quot;]&#039;);\n\necho $panelonecontent;\n\necho do_shortcode(&#039;[tabby title=&quot;&#039; . $boilerstitle . &#039;&quot;]&#039;);\n\necho $boilerspanel;\n\necho do_shortcode(&#039;[tabby title=&quot;&#039; . $gastitle . &#039;&quot;]&#039;);\n\necho $gaspanel;\n\necho do_shortcode(&#039;[tabby title=&quot;&#039; . $bathroomstitle . &#039;&quot;]&#039;);\n\necho $bathroomspanel;\n\necho do_shortcode(&#039;[tabbyending]&#039;);\n\n[\/insert_php]<\/code><\/pre>\n<p>Can anyone shed any light on what the issue might be please?<\/p>\n<p>Thanks!<\/p>\n<p>https:\/\/wordpress.org\/plugins\/insert-php\/<\/p>\n","protected":false},"template":"","class_list":["post-6769701","topic","type-topic","status-publish","hentry","topic-tag-parse-error","topic-tag-syntax-error"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6769701","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\/6769701\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=6769701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}