PHP - Return everything after delimiter

后端 未结 7 1620
北恋
北恋 2021-01-19 01:00

There are similar questions in SO, but I couldn\'t find any exactly like this. I need to remove everything up to (and including) a particular delimiter. For example, given t

相关标签:
7条回答
  • 2021-01-19 01:42

    EDIT: this one works fine.

    $str = "File:MyFile.jpg";
    $str = substr( $str, ( $pos = strpos( $str, ':' ) ) === false ? 0 : $pos + 1 );
    
    0 讨论(0)
提交回复
热议问题