{"id":181,"date":"2012-01-31T20:20:32","date_gmt":"2012-01-31T20:20:32","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=181"},"modified":"2025-10-19T01:46:59","modified_gmt":"2025-10-19T00:46:59","slug":"true-false-test","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/php\/if\/true-false-test","title":{"rendered":"? True False Test"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Examples<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  $MyVariable = $MyVariable ? True : False;\n\n  $MyVariable ? print \"True\" : print \"False\";<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Providing to JavaScript<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  $IsEnabled = True;\n  $IsEnabledJavascript = $IsEnabled ? \"true\" : \"false\";\n\n  $HtmlOutput .= &lt;&lt;&lt;_END\n    &lt;script&gt;\n      \/\/----- GLOBAL VARIABLES -----\n      var IsEnabled  = $IsEnabledJavascript;\n    &lt;\/script&gt;\n_END;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Examples Providing to JavaScript<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-181","post","type-post","status-publish","format-standard","hentry","category-if"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=181"}],"version-history":[{"count":4,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/181\/revisions"}],"predecessor-version":[{"id":5163,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/181\/revisions\/5163"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}