Home Backend Development PHP Tutorial 循环不知道原因结束

循环不知道原因结束

Jun 13, 2016 am 10:26 AM
match quot val

求助 循环不知道原因结束

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);
Copy after login


有这样一个循环, 有80条记录,我在循环外打应数组,不出结果,根本没有执行到循环外面
我在循环里打赢数组,结果输出的值,只能循环在53条记录,就结束循环了。程序也不执行了。


------解决方案--------------------
用dump或dump_var显示一下各相关变量的值吧
------解决方案--------------------
鼠标右键看看是否被浏览器注释掉了?
------解决方案--------------------
为什么不考虑打印data[0]看看呢?
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 Jun 13, 2016 am 10:23 AM

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

Match matching method in java Match matching method in java Apr 28, 2023 pm 10:31 PM

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

What does the val method in jquery do? What does the val method in jquery do? Mar 25, 2023 am 11:14 AM

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

How to use regular expressions to match strings in Java? How to use regular expressions to match strings in Java? Apr 19, 2023 pm 02:37 PM

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().

How to use java Match How to use java Match Apr 18, 2023 pm 01:55 PM

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().

不用数据库来实现用户的简单的下载,代码如下,但是却不能下载,请高手找下原因,文件路劲什么的没有关问题 不用数据库来实现用户的简单的下载,代码如下,但是却不能下载,请高手找下原因,文件路劲什么的没有关问题 Jun 13, 2016 am 10:15 AM

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

图片消失怎么解决 图片消失怎么解决 Apr 07, 2024 pm 03:02 PM

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

为什么小弟我在php上写的这个代码,在浏览器上什么都不显示 为什么小弟我在php上写的这个代码,在浏览器上什么都不显示 Jun 13, 2016 am 10:24 AM

为什么我在php上写的这个代码,在浏览器上什么都不显示啊

See all articles