Trusted SSL from just $3.44

TagPHP functions

PHP wordwrap() Function

P

what is the syntax of the WORDWRAP() function in php? wordwrap(string,width,break,cut) ParameterDescriptionstringRequired. Specifies the string to break up into lineswidthOptional. Specifies the maximum line width. Default is 75breakOptional. Specifies the characters to use as break. Default is “\n”cutOptional. Specifies whether words longer than the specified width should be...

PHP vsprintf() Function

P

what is the syntax of the VSPRINTF() function in php? vsprintf(format,argarray) ParameterDescriptionformatRequired. Specifies the string and how to format the variables in it.Possible format values:%% – Returns a percent sign%b – Binary number%c – The character according to the ASCII value%d – Signed decimal number (negative, zero or positive)%e – Scientific notation...

PHP vprintf() Function

P

what is the syntax of the VPRINTF() function in php? vprintf(format,argarray) ParameterDescriptionformatRequired. Specifies the string and how to format the variables in it.Possible format values:%% – Returns a percent sign%b – Binary number%c – The character according to the ASCII value%d – Signed decimal number (negative, zero or positive)%e – Scientific notation...

PHP vfprintf() Function

P

what is the syntax of the VFPRINTF() function in php? vfprintf(stream,format,argarray) ParameterDescriptionstreamRequired. Specifies where to write/output the stringformatRequired. Specifies the string and how to format the variables in it.Possible format values:%% – Returns a percent sign%b – Binary number%c – The character according to the ASCII value%d – Signed decimal...

PHP ucwords() Function

P

what is the syntax of the UCWORDS() function in php? ucwords(string, delimiters) ParameterDescriptionstringRequired. Specifies the string to convertdelimitersOptional. Specifies the word separator characterPHP 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"); ...

PHP ucfirst() Function

P

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

ucfirst(string)

ParameterDescriptionstringRequired. Specifies the string to convertPHP UCFIRST() method

examples of the UCFIRST() function

Example 1. In this example, we convert the first character of “hello” to uppercase.

<?php
echo ucfirst("hello world!");
?>

PHP trim() Function

P

what is the syntax of the TRIM() function in php? trim(string,charlist) ParameterDescriptionstringRequired. Specifies the string to checkcharlistOptional. Specifies which characters to remove from the string. If omitted, all of the following characters are removed:”\0″ – NULL”\t” – tab”\n” – new line”\x0B” – vertical...

PHP substr_replace() Function

P

what is the syntax of the UBSTR_REPLACE() function in php? substr_replace(string,replacement,start,length) ParameterDescriptionstringRequired. Specifies the string to checkreplacementRequired. Specifies the string to insertstartRequired. Specifies where to start replacing in the stringA positive number – Start replacing at the specified position in the stringNegative number – Start...

PHP substr_count() Function

P

what is the syntax of the SUBSTR_COUNT() function in php? substr_count(string,substring,start,length) ParameterDescriptionstringRequired. Specifies the string to checksubstringRequired. Specifies the string to search forstartOptional. Specifies where in string to start searching. If negative, it starts counting from the end of the stringlengthOptional. Specifies the length of the searchPHP...

PHP substr_compare() Function

P

what is the syntax of the UBSTR_COMPARE() function in php? substr_compare(string1,string2,startpos,length,case) ParameterDescriptionstring1Required. Specifies the first string to comparestring2Required. Specifies the second string to comparestartposRequired. Specifies where to start comparing in string1. If negative, it starts counting from the end of the stringlengthOptional. Specifies how much...

Tutor Network

Learn PHP from A to Z