<?php
include "../../inc/inc.koneksi.php";

$angka = $_POST['angka'];
$jh	   = $_POST['jhuruf'];
$titik = 0;
$huruf = '';

while($jh>0){
	$titik = $titik+1;
	$num = substr ($angka,$jh-1,1);
	if($titik==4){
		if(!($num=='-')){
			$huruf='.'.$huruf;			
		}
		$titik=1;
	}
	$huruf = $num.$huruf;
	$jh=$jh-1;
}
$data['huruf'] = $huruf;
echo json_encode($data);
?>
