A string variable is used to store and
manipulate text.
String Variables in PHP
String variables are used for values that contains
characters.In this chapter we are going to look at the most common functions and operators used to manipulate strings in PHP.
After we create a string we can manipulate it. A string can be used directly in a function or it can be stored in a variable.
Below, the PHP script assigns the text "Hello World" to a string variable called $txt:
<?php
$txt="Hello World"; echo $txt; ?> |
Hello
World
|
No comments:
Post a Comment