Home >Backend Development >PHP Tutorial >Summary of commonly used functions in PHP

Summary of commonly used functions in PHP

WBOY
WBOYOriginal
2016-07-29 09:13:53943browse

Summary of commonly used functions in php

String interception:

1. substr('String to be intercepted', 'Start from the number of characters', 'To the number of characters End');字 // Tie the string with a certain character into an array

Substr ($ cut [0], 'Start from the characters', 'to the end of the characters'); ; U ... $ $ substr ($ cut [n], 'Start from the first characters', 'to the end of the characters ends');

String length:

1. strlen('string');

* Calculate the string Length

​​​ Array and string conversion:


1.
explode('A character in the string to be intercepted', 'String to be intercepted');

2.implode('array');

1. round('Floating point number' ; 2. ceil( 'Floating point number'); // Round up as long as there are digits after the decimal point


​​​

                                                                                             

The above has introduced a summary of commonly used functions in PHP, including relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.


Statement:
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
Previous article:PHP FTP operationNext article:PHP FTP operation