What is the PHP function used to search for a substring within a string?

To search for a substring within a string in PHP, you can use the `strpos()` function. This function returns the position of the first occurrence of a substring within a string, or `false` if the substring is not found. You can use this function to check if a specific substring exists within a larger string and determine its position.

$string = "Hello, World!";
$substring = "World";

if(strpos($string, $substring) !== false){
    echo "Substring found at position: " . strpos($string, $substring);
} else {
    echo "Substring not found";
}