Explode usage-PHP source code

Source: Internet
Author: User
Tags php explode
Ec (2); phpexplode function usage, this is my own explode usage if (! Empty ($ ct) {& nbsp; if (strpos ($ ct, & quot; | & quot;) false) {& nbsp; & nbsp; mysql_query ($ SQL) ordie (mysql_error (); & nbsp; script ec (2); script

Php explode function usage, which is my own explode usage

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 ");

}

For Original article reprinted, please note: www.111cn.net

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.