PHP else

1 개요[ | ]

PHP else
$a = 3;
$b = 5;
if ($a > $b) {
  echo "a > b";
} else {
  echo "a <= b";
}
$a = 3;
$b = 5;
if ($a > $b):
  echo "a > b";
else:
  echo "a <= b";
endif;
<?php
$a = 3;
$b = 5;
?>
<?php if ($a > $b): ?>
  a > b
<?php else: ?>
  a <= b
<?php endif ?>

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}