Skip to content

Instantly share code, notes, and snippets.

@rizkiv1
Created March 11, 2020 13:40
Show Gist options
  • Save rizkiv1/698d038db5df8526a64eb5c00cb91132 to your computer and use it in GitHub Desktop.
Save rizkiv1/698d038db5df8526a64eb5c00cb91132 to your computer and use it in GitHub Desktop.
<form action="#" method="post">
Nominal Rp. <input type="text" name="nominal" /> <br/>
<input type="submit" value="SUBMIT" />
</form>
<?php
$nominal = isset($_POST["nominal"]) ? $_POST["nominal"] : 0;
$format = number_format($nominal,2,",",".");
echo "Format Nominal : Rp. $format" ;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment