7. (A) Write a PHP program to demonstrate different string functions

7. (A) Write a PHP program to demonstrate different string functions

<?php
echo strlen("Hello");
echo strchr("Hello world!","world");
echo str_replace("world","Peter","Hello world!");
echo str_word_count("Hello world!");
echo strpos("I love php, I love php too!","php");
echo substr_count("Hello world. The world is nice","world");
echo substr("Hello world",6);
echo strtolower("Hello WORLD.");
echo strtoupper("Hello WORLD.");
echo strcmp("Hello world!","Hello world!");
echo strcasecmp("Hello world!","Hello world!");
?>
7. (A) Write a PHP program to demonstrate different string functions 7. (A) Write a PHP program to demonstrate different string functions Reviewed by admin on December 24, 2019 Rating: 5

No comments:

Powered by Blogger.