Jump to content

[SOLVED] when somthing = blank set it to somthing


loony383

Recommended Posts

 

Short if:

 

<?php
      $page = isset($_GET['page']) ? $_GET['page'] : 'news';
?>

 

Long if:

 

<?php
    $page = '';

    if ( isset( $_GET['page'] ) )
    {
         $page = $_GET['page'];
    }
    else
    {
         $page = 'news';
    }
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.