朱纯树博客
VPS测评推荐网站
cloudacead cloudacead

PHP如何删除最后一个字符?

PHP如何删除最后一个字符?插图

 

PHP如何去掉最后一个字符?

在PHP中可以使用“rtrim()”函数去掉最后一个字符,该函数用于删除字符串末端的空白字符或者其它字符,其语法是“rtrim(str,char) ”,其参数str表示要操作的字符串,参数char表示要去除的字符。

使用范例

以上例程会输出:

string(32) "        These are a few words :) ...  "

string(16) "    Example string

"

string(11) "Hello World"

string(30) "        These are a few words :) ..."

string(26) "        These are a few words :)"

string(9) "Hello Wor"

string(15) "    Example string"

 

文章来源于互联网: PHP如何删除最后一个字符?

赞(0) 打赏
未经允许不得转载:VPS测评推荐网站 - 朱纯树博客 » PHP如何删除最后一个字符?

评论 148

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #150

    Get warning information here. Drugs information sheet.
    https://nexium.top/# get nexium without prescription
    Read information now. drug information and news for professionals and consumers.

    WillieErert10小时前回复
  2. #149

    Actual trends of drug. What side effects can this medication cause?
    oral ivermectin cost
    Prescription Drug Information, Interactions & Side. earch our drug database.

    KevinCaf1天前回复
  3. #148

    Everything what you want to know about pills. Get warning information here.
    https://stromectolst.com/# ivermectin uk
    Get warning information here. Get information now.

    Jesselap1天前回复
  4. #147

    Comprehensive side effect and adverse reaction information. All trends of medicament.
    stromectol drug
    Get information now. п»їMedicament prescribing information.

    Zacharybor1天前回复
  5. #146

    Get here. Learn about the side effects, dosages, and interactions.
    ivermectin generic name
    Some trends of drugs. Some are medicines that help people when doctors prescribe.

    KevinCaf2天前回复
  6. #145

    Get information now. All trends of medicament.
    ivermectin
    Comprehensive side effect and adverse reaction information. Read here.

    Ronaldhax2天前回复
  7. #144

    Get warning information here. Some are medicines that help people when doctors prescribe.
    https://stromectolst.com/# stromectol oral
    Learn about the side effects, dosages, and interactions. Drug information.

    Zacharybor3天前回复
  8. #143

    Some are medicines that help people when doctors prescribe. Top 100 Searched Drugs.
    https://stromectolst.com/# buy stromectol uk
    Some are medicines that help people when doctors prescribe. Cautions.

    Jesselap3天前回复
  9. #142

    Everything about medicine. Some trends of drugs.
    cost of ivermectin
    Generic Name. Comprehensive side effect and adverse reaction information.

    Ronaldhax3天前回复
  10. #141

    Read information now. Get here.
    https://stromectolst.com/# stromectol 3mg
    Medicament prescribing information. Everything about medicine.

    KevinCaf3天前回复
  11. #140

    Comprehensive side effect and adverse reaction information. Read now.
    https://stromectolst.com/# generic ivermectin cream
    Read information now. Drugs information sheet.

    Zacharybor4天前回复
  12. #139

    Prescription Drug Information, Interactions & Side. п»їMedicament prescribing information.
    https://stromectolst.com/# stromectol ivermectin tablets
    Read now. Best and news about drug.

    Ronaldhax4天前回复
  13. #138

    Generic Name. What side effects can this medication cause?
    https://stromectolst.com/# generic stromectol
    Commonly Used Drugs Charts. Read here.

    KevinCaf5天前回复