どうも、ちょげ(@chogetarou)です。
substr()を使って文字列(string)の指定文字以降を切り出す方法を紹介します。
方法

substr()を使って文字列(string)の指定文字以降を切り出すには、strpos()を使います。
まず、substr()を呼び出します。
substr()の第1引数に対象の文字列、第2引数に「strpos() + 1」を指定します。
strpos()の第1引数に対象の文字列、第2引数に特定の文字を指定します。
//char=指定文字, text=対象の文字列,
$result = substr(text, strpos(text, char) + 1);
上記のsubstr()は、対象の文字列(string)の指定文字以降を切り出します。

PHP: substr - Manual
Return part of a string

PHP: strpos - Manual
Find the position of the first occurrence of a substring in a string
使用例
<?php
$text = "Hello,World";
$result = substr($text, strpos($text, ",") + 1);
echo $result;
?>
出力:
World
コメント