本文介绍了如何删除最后一个单词中的逗号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在视野中,它就像

Bar,Children's Play Area,Conference& Banquet Facilitiy,

这里我要删除会议后的逗号&宴会Facilitiy.where逗号不是必需的。我怎么办。建议我

以下是编码



 $ mulcheck = $ form ['  Venue'] ['  facility']; 

$ mulcheck1 = explode( ,$ mulcheck);


for($ i = 0; $ i< count($ mulcheck1); $ i ++)
{
echo $ getfacility1 [$ i] [' Facility'] [' facility']。' ;

}
解决方案




In view it is comig like
Bar,Children's Play Area,Conference & Banquet Facilitiy,
Here i want to remove comma after Conference & Banquet Facilitiy.where comma is not required.How can i do it.Suggest me
Below is the coding

$mulcheck=$form['Venue']['facility'];

                  $mulcheck1=explode(",",$mulcheck);


           for($i=0;$i<count($mulcheck1);$i++)
           {
           echo $getfacility1[$i]['Facility']['facility'].',';

            }
解决方案




这篇关于如何删除最后一个单词中的逗号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 11:39