Strpos Function
<html>
<body>
<?php
$str1="test";
$str2="This is a testing string ";
$pos=strpos($str2,$str1);
echo "Given String : ".$str2."</br>";
echo "String to be matched : ".$str1."</br>";
echo "Match found at position : ".$pos;
?>
</body>
</html>
<html>
<body>
<?php
$str1="test";
$str2="This is a testing string ";
$pos=strpos($str2,$str1);
echo "Given String : ".$str2."</br>";
echo "String to be matched : ".$str1."</br>";
echo "Match found at position : ".$pos;
?>
</body>
</html>
No comments:
Post a Comment