Regular collection problem, please help me, wait online – php tutorial

Target page http://www.weather.com.cn/weather1d/101070101.shtml Desired value 1. Line 448 of the page source code, Updated at 2014-08-23 07:30 The value in the html tag 2. The data between rows 586 to 730, ( Which day, what number, weather conditions, maximum temperature and minimum temperature, wind direction and wind strength) is a total of 7 days of data Please help me, I really can’t write regular expressions Reply to discussion (solution) You can use PHPQuery, the usage is similar to JQuery The regular expression of the first question is: \d{4}-\d{2}-\d{2} \d{2}:\d{2}Update The second question is too many, still reading

Please help me, thank you – php tutorial

Please help me, thank you – php tutorial

php mysql html Write your review! Come on, watch it all Member login | User registration Recommended reading html mysql automatically adds the serial number field column in the query results select(@rowNO:@rowNo+1)ASrowno,field1,field2,field3from(selectfield1,field2,field3fromtabl … [detailed] Crayon Shin-chan 2023-09-11 14:46:48 java [JavaWeb] Shijiazhuang Metro Ride System – First Edition (Function is not yet complete) Team members: Gundam, Cheng Chaoran Project purpose: Calculate the optimal route for taking the subway and display it on the map Personal task: Call the java code written by teammates and display the results on the web page New knowledge: Baidu Map API, using JQuery AJAX variant… [detailed] Crayon Shin-chan 2023-09-11 14:44:04

PHP syntax error, I have been struggling for a day, please help me.

I wrote an infinite category drop-down function, but the following code always reported an error. I have been struggling for a day. Please give it a try. $str_select.= “” .str_repeat( “-” ,$depth) . $row[‘classname’].””; //String construction Error message: Parse error: syntax error, unexpected T_IF Reply to discussion (solution) Request Experts help 11! $str_select .= “” .str_repeat( “-” ,$depth) . $row[‘classname’].””; //String construction Reference Building Above, if you write them separately, it will be easier to know where you are wrong Do not put them on the same line. If it must be possible??? $str_select.= “” .str_repeat( “-” ,$depth) . $row[‘classname ‘].””; //String construction

【】I don’t know this php, please help me.

Now the company uses an ecshop tool, and then I searched online for how to change the file index.dwt file, then uploaded it to the server, and then refreshed the page. The result remained unchanged. The page is still the same, and even the files on the server were restored. In the end What to do. I have an announcement on the homepage. Now I can configure it in the background to display the article title. Now I want to change it. Instead of displaying the title, I will display the content of an article! Please help me, God! {$article_item.short_title} This is the one marked in red! If you know how, add me as a Q and help me! 491119051 Reply to discussion (solution) Don’t sink! , help online! Have you run it locally? Has the page changed after the change? Is the cache cleared? Now the company uses an ecshop tool, and then I searched online for methods to change the file index.dwt file, then uploaded it to the server, and then refreshed the page, the result remained unchanged, and the page remained the same. , even the files on the server have been restored, what should I do?…

Please help me, phpsocket problem – php tutorial

$appenStr = $buf = ”; $time = time(); for($i=0;$i 5){ break; } if($buf){ $appenStr .= $buf; }else{ break; } } echo $appenStr; After reading a lot of information on the Internet, it turns out that the socket_read function is blocked, causing the client program to remain in a state of suspended animation, waiting for the result of the above code to return. But I can get the data out this way. $buf = socket_read($msgsock, 8192); $buf .= socket_read($msgsock, 8192); $buf .= socket_read($msgsock, 8192 ); But you can’t just calculate the number of bytes to get it. I also tried the following code, but it still suspended animation and kept loading. $appenStr = $out = ”; $start_time = time(); do{ if (false === ($out = socket_read($msgsock, 8192))) { echo (“SOCKET_READ_ERROR: ” . socket_strerror(socket_last_error($msgsock))); $str = “”; break; } if (time() – $start_time > 1) { echo (“SOCKET_READ_ERROR: Timeout!!!”) ; $str = “”; break; } $appenStr .= $out; } while ($out != “”); Ask for guidance Reply to discussion (solution) If you try to read again after the input stream has been read empty, a deadlock will occur (because nothing can be read anymore) So it is very important to accurately determine…

Thinkphp small problem, please help me, thank you – php tutorial

$optstr=implode(‘,’,$array); $where[‘cid’]=array(‘in’,$optstr); I would like to ask about array() in the second sentence The ‘in’ in it means nothing and what does it do? ? ? Thank you. Reply to discussion (solution) Let me state it first: I have never used thinkphp Assuming that your code is correct, then he said: In the final executed sql command, there iscid in (1,2,3,4) Such ingredients are executed within the brackets The in here is actually the keyword in sql. It is just encapsulated by thinkphp and will eventually be parsed into the most native sql statement. You can use $Model->getLastSql() to see the most recently executed sql. in is your cid value in the sql statement, which can be the value in the $optstr array

Please help me, how to deal with this change, php array combination

For example, I have two arraysA group: 10,11,12,13 B group: 14,15 I want to combine them into 10|14,11|14,12 |14,13|14,10|15,11|15,12|15,13|15 Thank you, there may be three or four groups, such as group A, group B, group C, group D /> Reply to discussion (solution ) You are asking for the Cartesian product. There are several related discussions in the essence areaHere is another version $a = array(10,11,12,13);$b = array(14,15);foreach(Descartes($a, $b) as $v) $r[] = join(‘,’, $v);echo join(‘|’, $r); 10,14|10,15|11,14|11,15|12,14|12,15|13,14|13,15 function Descartes($d) { if(func_num_args() > 1) $d = func_get_args(); $r = array_pop($d ); while($d) { $t = array(); $s = array_pop($d); if(! is_array($s)) $s = array($s); foreach($s as $x) { foreach($r as $y) $t[] = array_merge(array($x), is_array($y) ? $y : array($y)); } $r = $t; } return $r; } You are asking for the Cartesian product. There are several related discussions in the essence areaHere is a version $a = array(10,11,12,13);$b = array(14,15);foreach(Descartes($a, $b) as $v ) $r[] = join(‘,’, $v);echo join(‘|’, $r); 10,14|10,15|11,14|11,15|12,14 |12,15|13,14|13,15 function Descartes($d) { if(func_num_args() > 1) $d = func_get_args(); $r = array_pop($d); while($d) { $t = array(); $s = array_pop($d); if(! is_array($s)) $s = array( $s); foreach($s as $x) { foreach($r as $y) $t[] = array_merge(array($x), is_array($y)…

Please help me, PHP master, what to do with this string&#183

Please help PHP master how to deal with this string·$str = “http://www.test.com/imges/1.jpg–1,http://www.test.com /imges/3.jpg–2,http://www.test.com/imges/3.jpg–3”; I don’t know how to write regular expressions for the results I want />$str1 = “http://www.test.com/imges/1.jpg,http://www.test.com/imges/3.jpg,http://www.test. com/imges/3.jpg”; $str2 = “1,2,3”; Please help me ——Solution——————– PHP code $str = “http://www.test.com/imges/1.jpg–1,http://www.test.com/imges/3.jpg–2,http://www.test. com/imges/3.jpg–3″; $str1= preg_replace(‘/–(\d+)/’,”,$str); preg_match_all(‘/–(\d+)/’,$str,$m); $str2=join(‘,’,$m[1]);

How to get the value of html drop-down menu in php background, please help me

How to get the value of html drop-down menu in php background, please help Please select: Please select {foreach $pe.roles as $value} {$value.role_name} {/foreach} ——Solution——————–At your choice Set the name attribute in the tag and obtain it through the name attribute value in the PHP backgroundFor example: Test PHP code: if(isset($_POST[“select1”])){ echo $ _POST[“select1”];}——Solution—————— —echo @$_POST[“selectRole1”];You can get it

Please help me, how to deal with it – php tutorial

Please help me, how to deal with it – php tutorial

Please help me~Who can use FOR loop to write the numbers into the shape of an equilateral triangle?Who can write down the code for me? ——Solution—— —————Equilateral triangle? That’s troublesome…——Solution——————–The main problem is that you didn’t explain what numbers they are and what rules they use to arrange them

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: 34331943@QQ.com

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索