Created
June 5, 2014 08:36
-
-
Save foru17/e23ba1a8a247f7f2c94b to your computer and use it in GitHub Desktop.
php 的基础 if else 兼容语法
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ($username == 'sally'): ?> | |
<h3>Hi Sally</h3> | |
<?php elseif ($username == 'joe'): ?> | |
<h3>Hi Joe</h3> | |
<?php else: ?> | |
<h3>Hi unknown user</h3> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment