php 数组元素加法

 

<?php
//添加一个元素 $dirs[]
= '1location';
//再次添加一个元素 $dirs[]
= '2location';
//第三次添加一个元素 $dirs[]
= '3location';
//打印 print_r($dirs);
?>

输出

Array ( [0] => 1location [1] => 2location [2] => 3location )

 

posted @ 2019-08-01 00:27  anobscureretreat  阅读(503)  评论(0编辑  收藏  举报