PHP ltrim behavior with character list

后端 未结 2 1999
深忆病人
深忆病人 2020-11-30 14:23

I was trying to achieve stripping off some beginning part from a string using php ltrim function. It works fine until it get a i character after colon : . if it find i after

2条回答
  •  日久生厌
    2020-11-30 15:24

    The second argument to ltrim is a list of characters to remove from the left side of the string.

    If you did

    
    

    You would get an empty string as the return value.

    Try this instead:

    
    

提交回复
热议问题