PHP learning notes 02

PHP study notes 02 array 1. create an array: $ users = array ("a", "B"); change the value of the array $ users [0] = "c"; for ($ I = 1; $ I & lt; 10; $ I ++) {& nbsp; $ users [$ I];} count the number of arrays count () foreach ($ usersas $ ke PHP

Shares a PHP sorting class for the progress of a field in a two-dimensional array.

Share a PHP file to sort a field in a two-dimensional array. & lt ;? Php/*** @ authorpaul & lt; 199921128@qq.com & gt; * @ desc sort a field in a two-dimensional array * @ data * $ testData = arra share a PHP sort a field in a two-dimensional array.

PHP cash sorting

PHP achieves various sorting & lt ;? Php/*** various sorting ** @ authorzhaojaingwei * @ since2011/11/2116 :14 **/$ list = array (, 8, 15 PHP to achieve various sorting 5) {while ($ low $ temp) {$ high --;} $ list [$ low] = $ list [$ high];

Common php functions

Php common functions: How long does a user calculate when the data submitted is a Chinese/English-digit mixed-rank? /**? * UTF-8 encoding case *? * Calculate the length of a string *? * @ Param ?? String ????? $ Str ??????? String? *? * @ Retu

How does php call functions in the dll of common software?

How does php call the functions in the dll of common software? php has an extension Library (the extension dll under the ext directory). now I want to call the functions in the dll file of common software, how can I call it? (Directly set it in the

Solutions for extracting a regular expression code

Find a regular extract code $ str = '& lt; ahref = & quot; http://item.taobao.com/item.htm? Id = 9694595974 & amp; ali_refid = a3_620362_1007: 1102370186: 7: 4670 find a regular expression extraction code $ Str =' ';For example, extract all the

Phpsocket cannot process data streams. how to avoid this problem (as if it is blocked)

Php socket cannot process data streams. how can this problem be solved (as if it is blocked)? php accepts a hardware to send data to port 8888, the socket_send function should return "\ xFA \ x01 \ x01 \ xFF \ xAA \ x00 \ x01 \ x00 \ x00 \ x00 \ x00

What's wrong with this regular expression?

Please take a look at what is wrong with this regular expression ?? Requirement: extract the hyperlink from the href in the string $ str. if the extracted hyperlink contains & quot; id = number & quot;, replace it with go. php? Id = number.

How does PHP obtain the parameters of the DELETE request?

How does PHP obtain the parameters of the DELETE request? RT ., for example, $ _ GET $ _ POST $ _ REQUEST, parse_str (file_get_contents ('php: // input'), $ arguments ); echo $ arguments PHP how to obtain the parameters of the DELETE request? RT.

How can I solve the regular expression extracted from an image?

Find the regular string extracted from an image: & lt; brtangram-key = & quot; module-split & quot; style = & quot; display: none; & quot; & gt; & lt; brstyle = & quot; display: none; & quot; & gt; & lt; brsty: obtain the regular expression

Smartyerror: unabletoreadresource solution

Smartyerror: unabletoreadresource solution when I learned smarty today, I encountered the Smartyerror: unabletoreadresource problem. on csdn, I saw a solution from the previous post. On this basis, I found another method: Smarty error: unable to

During collection, the upload connection address is abnormal.

During the collection, I opened a page in Google Chrome with the strange problem of downloading the connection address. I want to download the & lt; a & gt; tag with the connection address. after clicking it, you can download it normally. But the

"Unabletoconnecttoserver" error occurs when mssql_connect () is connected to CentOS.

Help: mssql_connect () connection problem in CentOS, where the & quot; Unabletoconnecttoserver & quot; problem occurs. When mssql_connect () is used in CentOS, the "Unabletoconnectserver" error message always appears. & N help: mssql_connect ()

Help me solve a problem. thank you.

Help me solve a small problem. Thank you & lt ;? Phpabstractclassabs_db {// abstract class abstractprotectedfunsabconnect (); // database connection abstractprotectedfunctionselect_db (); // select database abstractprotect to help me solve a small

Please check whether this function can be implemented through php (php directly accepts tcp format data of tcp protocol)

Please check whether this function can be implemented through php (php directly accepts tcp format data of tcp protocol). can php directly accept tcp format data of tcp protocol, I don't know if the call is correct.) the alarm is connected to the

A related question about mysqlNULL

For a question about mysqlNULL, I set the filed1 of the database table to not be empty, and set the filed2 field to null & nbsp; and then insert a piece of data, filed1 = 'test' filed2 remains unchanged. then I write a query statement selct *

How to sort the two arrays in the same order

How do I sort the two arrays in the same order? For example, $ a = [1, 2]; $ B = [3, 2, 1]; question: how to make $ B the same as $, PHPcode $ a = array (1, 2, 3); $ B = array (3, 2, 1); foreach ($ aas $ v) $ r [] = How to sort the two arrays in the

If the user sees the content of A, the content of B is not displayed. if the content of A is not displayed, the content of B is displayed. how can this problem be solved?

If the user sees A content, B content is not displayed. if the user does not see A content, B content is displayed. how can the user see A content, but B content is not displayed? if the user does not see A content, B content is displayed, what

Questions about adding data to SQL statements in PHP

This is my database table for adding data to PHP operation SQL: # default name type attribute null & nbsp; 1 idtinyint (3) UNSIGNED no & nbsp; 2n question about adding data to SQL operations in PHP Here is the table of my database: # Name Type

Php character hiding and changing * string replacement problems

For example, $ str = & quot; 13760721151 & quot; & nbsp; I want to change this mobile phone number: 1376*1151; how to use PHP to hide about 1/3 of the content in the middle. I'm grateful to you for the question of replacing the character strings

Total Pages: 12780 1 .... 9877 9878 9879 9880 9881 .... 12780 Go to: GO

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.