Syntax of strpos() function and Usage.
strpos(input_str,search_str,start)
input_str ->The string to search in.
search_str ->Specifies the string to search.
start ->This refers to the position of the string from where the search must begin.
1.Create strpos()
strpos("Easy to learn in BAJARANGISOFT","learn",5)
echo strpos("Easy to learn in BAJARANGISOFT","learn")
<?php
echo strpos("Easy to learn in BAJARANGISOFT","learn");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHP string position function</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="text-center">
<h1>PHP strpos() Function</h1>
</div>
<br>
<h2>The strpos() function find the position of the first occurrence of a substring in a string.</h2>
<div class="well">
<?php
echo "<h4>".strpos("Easy to learn in BAJARANGISOFT","learn",5)."</h4>";
?>
</div>
<br>
</div>
</body>
</html>