Posted By


petrafull on 02/24/10

Tagged


Statistics


Viewed 57 times
Favorited by 1 user(s)

if/else shortform


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. if($_POST['visible']==1) {
  2. $visible = 1;
  3. } else {
  4. $visible = 0;
  5. }
  6.  
  7. // equals:
  8.  
  9. ($_POST['visible']==1) ? $visible = 1: $visible = 0;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.