Friday, 21 September 2012

Find string with in another string in PHP

By using Below Code it is possible to found that whether a string has searching String

<?php
 $str = "Hi Me Find";

 $find = "Me"; 
 if(sizeof(explode($find,$str))>1)
 {
   echo "Me Found";
 }
 else
 {
    echo "Me Not Found"; 
 } 
?>

Share This!



No comments:

Post a Comment

Here We Write The Problems we face at different situations and Solutions to those problems.