explode() Function in PHP

php

explode() Function in PHP explode() is a built in function in PHP used to split a string in different strings. The explode() function splits a string based on a string delimeter, i.e. it splits the string wherever the delimeter character occurs. This functions returns an array containing the strings formed by splitting the original string. … Read more

PHP substr() function

php substr function

<?php   // PHP program to illustrate substr() function Substring($str){     $len = strlen($str);     echo substr($str, 8), “\n”;     echo substr($str, 5, $len), “\n”;     echo substr($str, -5, 10), “\n”;     echo substr($str,-8, -5), “\n”; }   // Driver Code $str=”blogsforblogs”; Substring($str);   ?> Output: blogs forblogs blogs for The substr() is a built-in function in PHP that is … Read more