Get a Quote

Your Name (required)

Business Name

Your Email (required)

Budget (required)

When you need this done?

Project details


Website design tutorial with php

PHP string

A string is a sequence of characters, like “Hello world!”.

PHP String Functions

The PHP strlen() function returns the length of a string.


Return the length of the string “Hello world!”:

echo strlen("Hello world!"); // outputs 12

str_word_count() – Count Words in a String

The PHP str_word_count() function counts the number of words in a string.


Count the number of word in the string “Hello world!”:

echo str_word_count("Hello world!"); // outputs 2

strrev() – Reverse a String

The PHP strrev() function reverses a string.


Reverse the string “Hello world!”:

echo strrev("Hello world!"); // outputs !dlrow olleH

When you develop your site with php, these functions may help you. You edit or write php in with code editor from file manager in techvila hosting control panel.

Leave a Reply

Your email address will not be published. Required fields are marked *