Home > Backend Development > PHP Tutorial > Summary of some points to note in the process of learning PHP_PHP Tutorial

Summary of some points to note in the process of learning PHP_PHP Tutorial

WBOY
Release: 2016-07-13 10:26:01
Original
709 people have browsed it

1.php passes value to javascript
How php passes value to javascript: you need to put quotation marks outside the tag
document.getElementById("titor"+a+ b).innerHTML="";
Note: In fact, my original understanding was wrong, php is a dynamic display language. In fact, in the echo that displays the relevant text, because the original one does not have quotation marks, it is natural to add quotation marks

2. Timestamp conversion
strtotime can convert the datetime in mysql Convert to timestamp;

3. Regarding data rounding
number_format($time*$deposit_money*0.05/365,2) The following 2 means retaining 2 decimal places, which is Rounded. Another way echo sprintf("%.2f", $number); without rounding

1.GRANT and REVOKE commands:
Grant and cancel permissions for mysql users, which are divided into four levels Global - Database - Table - Column

2. Create index
can make the query faster create index statement

3. Retrieve variable
$_POST $_GET $_REQUEST

4. heredoc syntax
echo <<line 1
line 2
line 2
theEnd
everything in theEnd Treated as a string

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/824863.htmlTechArticle1. How to pass value from php to javascript: You need to put quotation marks outside the ?php? tag document.getElementById("titor"+a+b).innerHTML="?php echo "May 20, 2013 13:25...
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