Ceil for decimal numbers with precision:
function ceil_dec($number,$precision,$separator)
{
$numberpart=explode($separator,$number);
$numberpart[1]=substr_replace($numberpart[1],$separator,$precision,0);
if($numberpart[0]>=0)
{$numberpart[1]=ceil($numberpart[1]);}
else
{$numberpart[1]=floor($numberpart[1]);}
$ceil_number= array($numberpart[0],$numberpart[1]);
return implode($separator,$ceil_number);
}
echo ceil_dec(1.125,2,"."); //1.13
echo ceil_dec(-1.3436,3,"."); //-1.343
echo ceil_dec(102938.1,4,"."); //102938.1