Remove first 4 characters of a string with PHP

前端 未结 7 1242
我在风中等你
我在风中等你 2020-12-02 04:43

How can I remove the first 4 characters of a string using PHP?

7条回答
  •  隐瞒了意图╮
    2020-12-02 05:18

    You could use the substr function to return a substring starting from the 5th character:

    $str = "The quick brown fox jumps over the lazy dog."
    $str2 = substr($str, 4); // "quick brown fox jumps over the lazy dog."
    

提交回复
热议问题