Skip to content

Instantly share code, notes, and snippets.

@tri82wiyono
Created December 15, 2016 09:43
Show Gist options
  • Save tri82wiyono/af0d9d04fdd33e4f9d99b1cf04dc26f0 to your computer and use it in GitHub Desktop.
Save tri82wiyono/af0d9d04fdd33e4f9d99b1cf04dc26f0 to your computer and use it in GitHub Desktop.
fungsi set nol
<?php
/*
buat helper sendiri
jika data tidak diinput secara otomatis nilai yang masih ke tabel adalah angka 0
*/
function setnol($var){
if (trim($var)==''){
return 0;
}else{
return $var;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment