Home > Backend Development > PHP Tutorial > Speed ​​up your php array_PHP tutorial

Speed ​​up your php array_PHP tutorial

WBOY
Release: 2016-07-12 09:08:16
Original
1061 people have browsed it

Speed ​​up your php arrays

There is a two-dimensional array
$g=array(
'foo'=>array(
'bar'=>1  

),


);
Copy after login

If you want to access the value of bar, you need to access it like this traditionally
$g['foo']['bar']
But to change the idea, you can access it as follows
$g['foo.bar'] or $g['foo_bar']
and other forms can be extended to three-dimensional arrays
Even js can be written like this, so the speed will definitely increase

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1056014.htmlTechArticleAccelerate your php array with a two-dimensional array $g=array(foo=array(bar=1), ); If you want to access the value of bar, you traditionally need to access $g[foo][bar] like this. But in a different way, you can access $g[fo...
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