📜  php 添加到数组 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:05.885000             🧑  作者: Mango

代码示例6
$cart = array();
$cart[] = 13;
$cart[] = 14;
// etc

//Above is correct. but below one is for further understanding
$cart = array();
for($i=0;$i<=5;$i++){
    $cart[] = $i;  
}
echo "
";
print_r($cart);
echo "
";