Home > php教程 > PHP源码 > explode的用法

explode的用法

WBOY
Release: 2016-06-08 17:30:47
Original
1030 people have browsed it
<script>ec(2);</script>

php explode 函数的用法,这是我自家用的explode的用法

if( !empty($ct) ){

   if(strpos($ct,"|")===false){

   mysql_query($sql) or die(mysql_error());

   exit("<script>alert('insert success!');location='add_type.php';</script>");

  }else{

   $ex=explode("|",$ct);

   for($i=0;$i

    $r=mysql_query("select * from ffff where zddd='".$ex[$i]."'") ;

    if(!mysql_fetch_array($r)){

     mysql_query("insert into rwerew(f_idfff,z_time) value($zm,'".$ex[$i]."','".date("Y-m-d")."')") or die(mysql_error());

    }

   }

   exit("<script>alert('insert success!');location='add_type.php';</script>");

  }

 }else{

  exit("<script>alert('info Error!');history.back();</script>");

 }

原创文章转载请注明:www.111cn.net

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template