Php related questions about "red dot.

Source: Internet
Author: User
Tags preg
"Red Dot" in php... Why can't the content in $ arr [2] [$ id] be displayed only when the following red points are called? Confused & lt ;? Php & nbsp; include_once (& quot; conn. php & quot;); & nbsp; if ($ _ GET [I php's question about "red dot...
Why can't the content in $ arr [2] [$ id] be displayed only when the following red points are called? Confused
Include_once ("conn. php ");

If ($ _ GET [id] <= 60 ){
$ 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 ";
}
?>



------ Solution --------------------
Discussion
Why can't the content in $ arr [2] [$ id] be displayed only when the following red points are called? Confused
Include_once ("conn. php ");

If ($ _ GET [id] <= 60 ){
$ Con = file_get_contents ("http://it.sohu.com/7/1002/17/column203661721_32". $ _ GET [id]. ". shtml ");
$ P ......

------ Solution --------------------
This red dot is equal to the string connector
------ Solution --------------------
Red points connect the string, $ sum = "abc". "ef ";
Then $ sum = "abcdef ";
------ Solution --------------------
$ SQL = "INSERT INTO 'tmp _ url' ('id', 'title', 'URL') VALUES (NULL, '{$ arr [2] [$ id]}', '". $ v. "');";

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.