Home > Backend Development > PHP Tutorial > PHP array reference passing question

PHP array reference passing question

WBOY
Release: 2016-08-04 09:19:59
Original
1201 people have browsed it

PHP array reference passing question
As shown in the highlighted part of the picture, how can the operation here directly change the value of the $initialcount array element? Is it feasible to add the & symbol?

Reply content:

PHP array reference passing question
As shown in the highlighted part of the picture, how can the operation here directly change the value of the $initialcount array element? Is it feasible to add the & symbol?

Your code can be modified. . There are no parameters passed, it is global in the current code.

This operation can originally assign a value to $initialcount. What went wrong? &According to my understanding, it can only be used in the parameters of the declared function.

Related labels:
php
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