String Functions in Php | PHP Tutorial #8:
Youtube link:
https://www.youtube.com/watch?v=mYnGMQS_fUg&list=PLu0W_9lII9aikXkRE0WxDt1vozo3hnmtR&index=8
Blogpost:
https://www.codewithharry.com/videos/php-tutorials-in-hindi-8/
<?php
$name = "Harry is a good boy";
echo $name;
echo "<br>";
echo "The length of " . "my string is " . strlen($name);
echo "<br>";
echo str_word_count($name);
echo "<br>";
echo strrev($name);
echo "<br>";
echo strpos($name, "Harry");
echo "<br>";
echo str_replace("Harry", "Rohan", $name);
echo "<br>";
echo str_repeat($name, 4);
echo "<br>";
echo "<pre>";
echo rtrim(" this is a good boy ");
echo "<br>";
echo ltrim(" this is a good boy ");
echo "</pre>";
?>
No comments:
Post a Comment