PHP converts uppercase names to underscores, PHP underlines
Sometimes it is necessary to convert the uppercase of a string into _+ lowercase, and when the variable is named, it will run into this problem, directly on the code:
$name = ' apppromozhongqiu2014activestatusselector '; Echo Cc_format ($name); function Cc_format ($name) { $temp _ Array = array (); for ($i =0; $i
= && $ascii _code <=) { if ($i = = 0) { $temp _array[] = chr ($ascii _code + 32 ); } else{ $temp _array[] = ' _ '. Chr ($ascii _code + +); } } else{ $temp _array[] = $name [$i]; } } Return implode (", $temp _array);}
http://www.bkjia.com/PHPjc/990552.html www.bkjia.com true http://www.bkjia.com/PHPjc/990552.html techarticle PHP converts uppercase names into underscores, and PHP underscores sometimes need to convert uppercase in a string to _+ lowercase, which can be problematic when the variable is named ...