Home >php教程 >PHP源码 >生成excel 列序号

生成excel 列序号

PHP中文网
PHP中文网Original
2016-05-25 17:00:131087browse


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) : &#39;&#39;;
			$s = $remainder>=0? chr($charnum+$remainder) : &#39;&#39;;
			
			echo $loop .&#39; | &#39;. $quotient .&#39; | &#39;. $remainder .&#39; | &#39;. $f . $s ."
";
			
			
		}
	}

                   

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn