Thursday 19 June 2014

stristr() in php


stristr() in php

The stristr() function searches for the first occurrence of a string inside another string. This function returnns the rest of the strings (from the matching point) or False, if the string to search for is not found.

stristr(string,search);
Example :
<?php echo stristr("Hello world ! How are you?","world"); ?>

Output : world! How are you?

No comments: