• I have a script that when you select the a certain time zone it will show you the current time in that zone…

    But before you select the time it says

    Time:

    then after you select the time it would say something like this

    Time: 2005-09-06 02:04 GMT

    this is the part of the code that pulls up the info… how can i edit this, so Time: doesn’t show up untill after the zone is selected…hope this all makes since…

    Time: <? echo GetTime($input_location_id); ?>

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • If $input_location_id is undefined or empty at first, something like the following should do:

    <?php if($input_location_id) : ?>
    Time: <? echo GetTime($input_location_id); ?>
    <?php endif; ?>

    Thread Starter hbalagh

    (@hbalagh)

    Thanks Kafkaesqui it worked like a charm 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘general php code edit question’ is closed to new replies.