Home  >  Q&A  >  body text

substr() subspring()在实际使用中有什么区别么?

substr() subspring() 我知道他们的使用区别 但是在实际应用中有什么区别么?

phpcn_u224phpcn_u2242864 days ago1173

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-09-30 22:49:42

    Is there any difference between substr() subspring() in actual use? -PHP Chinese website Q&A-substr() Is there any difference between subspring() in actual use? -PHP Chinese website Q&A

    Please watch and learn.

    reply
    0
  • 阿神

    阿神2016-12-17 17:04:27

    substr方法用于返回一个从指定位置开始的指定长度的子字符串。stringObject.substr(start [, length ])

    subspring()用于提取字符串中介于两个指定下标之间的字符  substring(start,end)

    如果不知道长度就只能用substring了

    reply
    0
  • Cancelreply