Home >Backend Development >PHP Tutorial >PHP converts uppercase names into underscore-separated names_PHP tutorial
This article mainly introduces php to convert uppercase names into underscore-separated names. This article explains some names that are not used to the capital style. Methods such as Pascal naming and camel case naming method for conversion, friends in need can refer to it
Sometimes it is necessary to convert the uppercase characters in a string to _ lowercase. This problem will be encountered when naming variables. Go directly to the code:
ใ?
10 11
<๐>12<๐>
<๐>13<๐>
<๐>14<๐>
<๐>15<๐>
<๐>16<๐>
<๐>17<๐>
<๐>18<๐>
<๐>19<๐>
|
<๐>
<๐>$name = 'AppPromoZhongQiu2014ActiveStatusSelector';<๐>
<๐> <๐>
<๐>echo cc_format($name);<๐>
<๐>function cc_format($name){<๐>
<๐>$temp_array = array();<๐>
<๐>for($i=0;$i |