PHP ucwords() Function

PHP ucfirst() Function
PHP vfprintf() Function

what is the syntax of the UCWORDS() function in php?

ucwords(string, delimiters)
ParameterDescription
stringRequired. Specifies the string to convert
delimitersOptional. Specifies the word separator character
PHP UCWORDS() method

examples of the UCWORDS() function

Example 1. In this example, we convert the first character of each word to uppercase.

<?php
echo ucwords("hello world");
?>

Example 2. In this example, we convert the first character of each word to uppercase, with a custom word separator added.

<?php
echo ucwords("hello|world", "|");
?>
PHP ucfirst() Function
PHP vfprintf() Function
en English
X
Scroll to Top