I shared the code for the first time. Today I used simplexml to parse xml files and searched for a lot of methods to directly convert object array objects into arrays. I found that many codes are not useful and many use recursion, share my code
What is base64?
According to rfc2045, base64 is defined as base64 content Transfer Encoding. It is designed to describe the 8-bit bytes of any sequence as a form that is not easily recognized by people. (The base64 content-transfer-encoding is
Parameter passing in call_user_func_array
The following two lines are output:
Array (3) {[0] => string (3) "123" [1] => int (234) [2] => string (3) "fd "}
String (3) 123"
Why is the output of $ p not the entire array, but a string (3) "123 "?
What is base64?
According to rfc2045, base64 is defined as base64 content Transfer Encoding. It is designed to describe the 8-bit bytes of any sequence as a form that is not easily recognized by people.
Why use base64?
When designing this code, I
Write and generate excel files:
Copy codeThe Code is as follows: include 'phpexcel. php ';
Include 'phpexcel/Writer/excel2007.php ';
// Or include 'phpexcel/Writer/excel5.php'; for output. xls
Include 'phpexcel/IOFactory. php'; // PHPExcel factory
This article provides a detailed description of PHPExcel and the methods for integrating PHPExcel into the CI framework. For more information, see
Write and generate excel files:
The code is as follows:
Include 'phpexcel. php ';Include
{Code ...} question 1: divide the first index into a $ int array of 0, 1, and 2, and divide the English keys a, B, and c into a $ string array. I don't know how to deal with the distinction between 0, 1, 2 and English keys, because they are all
The values in the PHP array cannot be obtained .. After the form is submitted using POST: var_dump ($ _ POST); the output value of the POST array shows that the values in the values & quot; [1] PHP array cannot be obtained ..
After submitting a form
Thinkphp/SAE/database operation/D method problems a mesg table exists in the local database, and a maid field is added to the table. Use & nbsp; $ mesg = D ('mesg'); & nbsp; dump ($ thinkphp/SAE/database operation/D method issues in an operation
The
The following two lines are output:
Array (3) {[0]=> string (3) "123" [1]=> Int (234) [2]=> string (3) "FDG"}
String (3) "123"
Why is the output $p not the entire array, but just string (3) "123"? I read the manual, which reads:
Mixed
ThinkphpSAE database operation D method problems the local database originally had a mesg table, and then added a field maid after the table. Use & nbsp; $ mesgD (Mesg); & nbsp; dump ($ mesg) in an operation. The model contains protected $ _
Mb_convert_encoding (Addslashes ($u [+]), ' UTF-8 ', ' iso-8859-15,shift-jis,eucjp-win,sjis-win,iso-8859-1,utf-8 ')
This transcoding only the first valid, such as the first one is iso-8859-15, Western European code can be converted, but the
Two ways to merge arrays: $a + $b, array_merge ($a, $b)Merging indexed arrays using the operator +, duplicate indexes are discarded, and duplicate indexes with Array_merge () are reset, as in the following scenario:1php > $a =Array (); 2 3php > $b =
Regular expressions have always been a headache for me, but regular expressions are inseparable in my work. Regular expressions are widely used in code, vim editor, awk, and other Linux commands. This is a common regular expression in PHP code I
Write and build operations for Excel:
Copy Code code as follows:
Include ' phpexcel.php ';
Include ' phpexcel/writer/excel2007.php ';
Or include ' phpexcel/writer/excel5.php '; For the output. xls
Include ' phpexcel/iofactory.php
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.