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:
echo humanize('my_dog_spot'); // Prints 'My Dog Spot'
To use dashes instead of underscores:
echo humanize('my-dog-spot', '-'); // Prints 'My Dog Spot'
Please login to continue.