Home > Backend Development > PHP Tutorial > php中关于“红点”的有关问题。

php中关于“红点”的有关问题。

WBOY
Release: 2016-06-13 13:34:42
Original
857 people have browsed it

php中关于“红点”的问题。。。
为什么下面的红点必须叫上才能显示出$arr[2][$id]中的内容呢?很困惑
 include_once("conn.php");

  if($_GET[id]   $con=file_get_contents("http://it.sohu.com/7/1002/17/column203661721_32".$_GET[id].".shtml");
  $preg = "#

·(.*)#iUs";
  preg_match_all($preg,$con,$arr);
  foreach($arr[1] as $id=>$v){
------------------------

$sql="INSERT INTO `tmp_url` (`id`, `title`, `url`) VALUES (NULL, '".$arr[2][$id]
."', '".$v."');";
 
---------------------

mysql_query($sql);

  
  }
  $_GET[id]++;
  echo "<script>location.href='ls.php?id=".$_GET[id]."'</script>";
  }
?>



------解决方案--------------------
探讨
为什么下面的红点必须叫上才能显示出$arr[2][$id]中的内容呢?很困惑
include_once("conn.php");

if($_GET[id] $con=file_get_contents("http://it.sohu.com/7/1002/17/column203661721_32".$_GET[id].".shtml");
$p……

------解决方案--------------------
这红点等于是字符串连接符
------解决方案--------------------
红点把字符串连接了,$sum = "abc"."ef";
则$sum = "abcdef";
------解决方案--------------------
$sql="INSERT INTO `tmp_url` (`id`, `title`, `url`) VALUES (NULL, '{$arr[2][$id]}', '".$v."');";

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template