{"id":172,"date":"2008-06-03T14:40:00","date_gmt":"2008-06-03T17:40:00","guid":{"rendered":"http:\/\/helbertt.16mb.com\/site\/index.php\/2008\/06\/03\/condicional-if-no-php\/"},"modified":"2008-06-03T14:40:00","modified_gmt":"2008-06-03T17:40:00","slug":"condicional-if-no-php","status":"publish","type":"post","link":"https:\/\/helbertt.xyz\/site\/condicional-if-no-php\/","title":{"rendered":"Condicional If no Php"},"content":{"rendered":"<p>Ol\u00e1 pessoal!<\/p>\n<p>Hoje irei falar um pouco mais sobre a condicional IF no PHP.<\/p>\n<p>Primeiramente vamos ver como \u00e9 o algoritmo do comando If:<\/p>\n<p><span style=\"color:#ffcc00;\">Se <express\u00e3o>Ent\u00e3o<br \/><comando><br \/>Se n\u00e3o<br \/><comando><br \/>Fim se<\/span><\/p>\n<p>&amp;&amp; Conjun\u00e7\u00e3o<br \/>Disjun\u00e7\u00e3o n\u00e3o exclusiva<br \/>! Nega\u00e7\u00e3o<br \/>== Igual<\/p>\n<p>Condicional if no Php:<\/p>\n<p><span style=\"color:#ffcc00;\">if (expressao) {<br \/>comandos;<br \/>}else{<br \/>comandos;<br \/>}<br \/><\/span><br \/>Exemplo:<br \/>Vamos fazer um c\u00f3digo para ver quais dos dois n\u00fameros \u00e9 o maior:<\/p>\n<p><span style=\"color:#ffcc00;\">$num1 = &#8220;2&#8221;;<br \/>$num2 = &#8220;5&#8221;;<br \/>if($num1 > $num2) {<br \/>echo &#8220;$num1 \u00e9 maior que $num2&#8221;;<br \/>}else{<br \/>echo &#8220;$num2 \u00e9 maior que $num1&#8221;;<br \/>}<br \/><\/span><br \/>Espero que voc\u00eas tenham gostado!<br \/>At\u00e9 a pr\u00f3xima pessoal.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ol\u00e1 pessoal! Hoje irei falar um pouco mais sobre a condicional IF no PHP. Primeiramente vamos ver como \u00e9 o<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout"},"categories":[93,74],"tags":[],"_links":{"self":[{"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/posts\/172"}],"collection":[{"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/comments?post=172"}],"version-history":[{"count":0,"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/posts\/172\/revisions"}],"wp:attachment":[{"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/media?parent=172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/categories?post=172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/tags?post=172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}