Problem with echoing my array data in PHP
Posted
by ggfan
on Stack Overflow
See other posts from Stack Overflow
or by ggfan
Published on 2010-03-31T16:41:03Z
Indexed on
2010/03/31
16:43 UTC
Read the original article
Hit count: 129
php
I want to create an array of numbers: 10, 9,8...to 1. But when I echo $numbers, I get "Array" as the output as to the numbers.
There is probably a simple thing I missed, can you please tell me. thanks!
$numbers=array();
for ($i=10; $i>0; $i--){
array_push($numbers, $i);
}
echo $numbers;
© Stack Overflow or respective owner