$d=explode("@",$a) foreach($d as $k=>$r){ $res=explode("|",$r);} 能不能帮我写个正则呢?
$a="123@345@111"; preg_match_all("/[^@]+/",$a,$mat);
哪用preg_match_all()吧,手册上有提示说它有可能存在错误:be careful when using explode() on big strings, as it can also explode your memory usage
be careful when using explode() on big strings, as it can also explode your memory usage
[quote=引用 7 楼 u011625403 的回复:] [quote=引用 6 楼 xiaofanku 的回复:] 不删除的情况你分隔成功了?成功后存不到表里?
[quote=引用 6 楼 xiaofanku 的回复:] 不删除的情况你分隔成功了?成功后存不到表里?
不删除的情况你分隔成功了?成功后存不到表里?
[quote=引用 2 楼 u011625403 的回复:] $a="很长的东西@很长的东西@。。。"; $b=explode(”@“,$a); foreach($b as $k=>$v) {...//录入数据库} //$a 太长了,删掉一大堆才可以正常执行。 怎么办?
$a="很长的东西@很长的东西@。。。"; $b=explode(”@“,$a); foreach($b as $k=>$v) {...//录入数据库} //$a 太长了,删掉一大堆才可以正常执行。 怎么办?
87,991
社区成员
224,688
社区内容
加载中
试试用AI创作助手写篇文章吧