PHP

PHP Menu

PHP

ucwords() Function - Definition, Syntax, Parameters, Examples

Definition

The ucwords() function is used to convert the first character of each word in a string to uppercase.

Syntax

ucwords(string, delimiters)

Parameters

Parameter Description
string Required. Specifies the string to convert.
delimiters Optional. Specifies the word separator character.

Example

<?php
echo ucwords("welcome to php!");

Introduction

PHP Basics

PHP Advance

PHP OOP

PHP Functions and Methods