Table of Contents
<h4>string</h4>
<p>From w3schools.com, Experiment by Teeratus_R </p>
<?php
echo "Hello";
echo 'Hello';
?>
Result View Example
<h4>Double_or_Single_Quotes</h4>
<p>From w3schools.com, Experiment by Teeratus_R </p>
<hr>
<p>Double quoted string literals perform operations for special characters:</p>
<?php
$x = "John";
echo "Hello $x";
?>
<hr>
<p>Single quoted string literals returns the string as it is:</p>
<?php
$x = "John";
echo 'Hello $x';
?>
Result [View Example](ex2-Double or Single Quotes/index.php)
<h4>String Length</h4>
<p>From w3schools.com, Experiment by Teeratus_R </p>
<?php
echo strlen("Hello world!");
?>
Result View Example
<h4>Word Count</h4>
<p>From w3schools.com, Experiment by Teeratus_R </p>
<p>Word Count</p>
<?php
echo str_word_count("Hello world!");
?>
Result View Example
<h2>Search For Text Within a String</h2>
<p>From w3schools.com, Experiment by Teeratus_R </p>
<p>Search_For_Text_Within_a_String</p>
<?php
echo strpos("Hello world!", "world");
?>
Result [View Example](ex5-Search For Text Within a String/index.php)
Document in project
You can Download PDF file.