Advertisement
MizunoBrasil

if, else if, else

Jun 11th, 2022
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.14 KB | None | 0 0
  1. <?php
  2. $numero = 10;
  3. if ($numero > 0) {
  4.     echo "Positivo";
  5. }   else if ($numero < 0) {
  6.     echo "Negativo";
  7. }   else    {
  8.     echo "Número é zero";
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement