php生成excel列序号代码实例

前端之家收集整理的这篇文章主要介绍了php生成excel列序号代码实例前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

<div class="codetitle"><a style="CURSOR: pointer" data="66938" class="copybut" id="copybut66938" onclick="doCopy('code66938')"> 代码如下:

<div class="codebody" id="code66938">
public function loop(){
$loop = 0;
$charnum = 65; for(; $loop < 150; $loop++){
$quotient = intval($loop / 26);
$remainder = $loop % 26;$f = $quotient>0? chr($charnum+$quotient-1) : '';
$s = $remainder>=0? chr($charnum+$remainder) : '';echo $loop .' | '. $quotient .' | '. $remainder .' | '. $f . $s ."
";
}
}

原文链接:https://www.f2er.com/php/25360.html

猜你在找的PHP相关文章