Code in PHP for the ceiling function
问题 Anyone has ever programmed a PHP (or Perl) function to get the ceiling value Excel style? 回答1: This should be the answer, from php.net comments: // MS Excel function: Ceiling( number, significance ) // duplicates m$ excel's ceiling function if( !function_exists('ceiling') ) { function ceiling($number, $significance = 1) { return ( is_numeric($number) && is_numeric($significance) ) ? (ceil($number/$significance)*$significance) : false; } } echo ceiling(0, 1000); // 0 echo ceiling(1, 1); //