Download
    Interview Question     &Answer
Main Menu
PHP String@ Shwetank education.com
Definition
A string variable is used to store and manipulate text.
String variables are used for values that contain characters. A string can be used directly in a function or it can be stored in a variable.


the PHP script assigns the text "shwetank Education" to a string variable called $txt:
<?php
$txt="shwetank Education";
echo $txt;
?>

The output of the code above will be:
shwetank Education

The Concatenation Operator
The concatenation operator (.) is used to put two string values together. To concatenate two string variables together, use the concatenation operator:
<?php
$txt1="shwetank education";
$txt2="welocme to you!";
echo $txt1 . " " . $txt2;
?>
The output of the code above will be:
shwetank education welcome to you!

The strlen() function
The strlen() function is used to return the length of a string. Let's find the length of a string:
<?php
echo strlen("Shwetank Eucation!");
?>
The output of the code above will be:
17

Some PHP String Function


IT  Projects Links
M-Tech Thesis
Php Project
Java Project
Asp.Net Project
Android Project
Vb .Net Project
Html Project

------------------------------- Electronics  Project
Networking
Embedded system
Telecom
Robotics
CCNA
------------------------------- Latest IT  News


Copyright 2010-2015    shwetankeducation.com
Privacy & Terms