[PHP] Underscore to Camelcase
Line 3 converts the input into lowercase, then it is split into words, using ‘_’ as delimiter.
The for..loop is used to join the words back. Before joining, the first character of each word is changed to uppercase. The trim is optional.
Posted in Tao Of Programming at April 6th, 2009. 3 Comments.