Home >Backend Development >PHP Tutorial >How to assign values to PHP arrays
The content of this article is about how to assign values to PHP arrays. It has certain reference value. Now I share it with everyone. Friends in need can refer to it
<br/>
One of the methods creates an array:
<?php $a="abcd"; print($a[0]." ".$a[1]." ".$a[2]." ".$a[3]." "); ?>
<span style="font-family:'Courier New';"></span>
## Running result: a b c d
<br/>
<?php $http=array("www","csdn","net"); print($http[0].".".$http[1].".".$http[2]); ?>
The above is the detailed content of How to assign values to PHP arrays. For more information, please follow other related articles on the PHP Chinese website!