humanize($str[, $separator = '_'])
Parameters: |
|
---|---|
Returns: |
Humanized string |
Return type: |
string |
Takes multiple words separated by underscores and adds spaces between them. Each word is capitalized.
Example:
1 | echo humanize( 'my_dog_spot' ); // Prints 'My Dog Spot' |
To use dashes instead of underscores:
1 | echo humanize( 'my-dog-spot' , '-' ); // Prints 'My Dog Spot' |
Please login to continue.