把字符按照逗号分割成数组

admin4年前php914

 <?php 

$cars=$_POST['shuju'];

$cars=explode(',', $cars);

print_r($cars)



  ?>

 


相关文章

短地址生成,全套配置教程

短地址生成,全套配置教程

nginx 配置location / {rewrite  ^(.*)$  /index.php?s=/$1  last;}code rotoo.top.7z...

php过滤emod与特殊字符

<?php  function xml_entities($string) { //过滤emod $ts_zifu= json_encode($st...

把一个索引数组内的某个元素删除后直接转成json输出,数据格式不正确

可以看到数组格式在unset后发生变化 解决方法很简单 仅一行代码就可以解决在foreach后 增加$arr = array_values($arr);转至:https://blog.csdn.net...

php提示Notice: Undefined index解决方法与php未定义的变量提示错误的解决方法

在php.ini配置文件里设置把error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT修改成error_reporting = E_AL...

php post undefined index,PHP 中提示undefined index的解决方案

声明为空isset($_POST['user_email']),或者,empty($_POST['user_email'])在php.ini中设置error_repor...

批量插入

一条insert语句批量插入多条记录原创|浏览:138554|更新:2017-12-19 08:21一条insert语句批量插入多条记录常见的insert语句,向数据库中,一条语句只能插入一条数据:i...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。