Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

PHP - Switch

0 votes
5 views
added Mar 7 in PHP by LC Marshal Captain (20,510 points)
<?php
function translate_lease_term( $lease_term_id = NULL ){
  $lease_term_id = trim( $lease_term_id );
  if ( !isset( $lease_term_id ) || $lease_term_id === '' )
    return FALSE;

  switch ( $lease_term_id ) {
    case 'fh':
    return 'Freehold';
    case '999lh':
    return '999 years';
    case '99lh':
    return '99 years';
    case '30lh':
    return '30 years';
    case '60lh':
    return '60 years';
    case 'lh':
    return 'Leasehold';
    case 'mrl':
    return 'Malay Reserved Land';
    default:
    return FALSE;
  }

}
?>

 

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...