循环不知道原因结束
求助 循环不知道原因结束
- PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> $ss = array(); foreach($data[0] as $key => $val ){ preg_match('/<a href="(%5B%5E" preg_match class="a8 lazy" src="/static/imghw/default1.png" data-src="([^"></a>(.*)/isU',$val,$title); preg_match('/<strong>(.*)/isU',$val,$tuanPrice); preg_match('/<li>原价:(.*)元/isU',$val,$yuanPrice); preg_match('/class="L_F_2">(.*)折/isU',$val,$zheShu); preg_match('/class="a7">(.*)/isU',$val,$webName); preg_match('/\'(.*)\'/isU',$val,$time); $src_a = 'http://www.nduotuan.com'.$src[1]; $ss[] = array($title[1],$href[1],$src_a,$tuanPrice[1],$yuanPrice[1],$zheShu[1],$time[1],$webName[1]); //echo "<pre class="brush:php;toolbar:false">";print_r($ss); $html=''; } echo "<pre class="brush:php;toolbar:false">";print_r($ss);
有这样一个循环, 有80条记录,我在循环外打应数组,不出结果,根本没有执行到循环外面
我在循环里打赢数组,结果输出的值,只能循环在53条记录,就结束循环了。程序也不执行了。
------解决方案--------------------
用dump或dump_var显示一下各相关变量的值吧
------解决方案--------------------
鼠标右键看看是否被浏览器注释掉了?
------解决方案--------------------
为什么不考虑打印data[0]看看呢?

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

Note that match is used for matching operations, and its return value is of boolean type. Through match, you can simply verify whether a certain element exists in the list. Example // Verify whether there is a string in the list starting with a, and match the first one, that is, return truebooleananyStartsWithA=stringCollection.stream().anyMatch((s)->s.startsWith("a"));System.out .println(anyStartsWithA);//true//Verify whether the string in the list

The val method in jquery is used to return or set the value attribute of the selected element; when used to return a value, this method returns the value of the value attribute of the first matching element, and its syntax is "$(selector).val() "; When used to set a value, this method sets the value of the value attribute of all matching elements, and its syntax is "$(selector).val(value)".

Concept 1. Various Match operations can be used to determine whether a given Predicate meets the elements of a Stream. 2. Match operation is a terminal operation and returns a Boolean value. Instance booleananyStartsWithA=stringCollection.stream().anyMatch((s)->s.startsWith("a"));System.out.println(anyStartsWithA);//truebooleanallStartsWithA=stringCollection.stream().

Concept 1. Various Match operations can be used to determine whether a given Predicate meets the elements of a Stream. 2. Match operation is a terminal operation and returns a Boolean value. Instance booleananyStartsWithA=stringCollection.stream().anyMatch((s)->s.startsWith("a"));System.out.println(anyStartsWithA);//truebooleanallStartsWithA=stringCollection.stream().

不用数据库来实现用户的简单的下载,代码如下,但是却不能下载,请高手找下原因,文件路劲什么的没问题。

图片消失如何解决先是图片文件上传$file=$_FILES['userfile']; if(is_uploaded_file($file['tmp_name'])){$query=mysql_query("INSERT INTO gdb_banner(image_src ) VALUES ('images/{$file['name'
