+1 vote
in PHP by
Which of the following function in PHP returns a text in title case from a variable?

a) toUpper($var)

b) ucwords($var)

c) ucword($var)

d) All of the above

1 Answer

0 votes
by

b) ucwords($var)

Description: The ucwords() is an in-built function of PHP, which is used to convert the first character of each word to uppercase in a string. It takes a string as an input and converts the first character of each word of the string to uppercase. The other characters of the string remain the same.

Related questions

+1 vote
asked May 13, 2022 in PHP by john ganales
+1 vote
asked May 11, 2022 in PHP by sharadyadav1986
...