smansakra
01-11-2011, 02:15 AM
$day_array = array();
foreach (range(31, 1)as $day){
array_push($day_array, $day);
}
if i write a code like above, the $day_array will return like this:
Array (
[0] => 31
[1] => 30
[2] => 29
[3] => 28
and so on...
is there a solution to make 'my array key' and 'my key value' has the same value like this one
$day_array = array(
'31' => '31',
'30' => '30',
'29' => '29'
and so on...
);
thanks.. i need help...
foreach (range(31, 1)as $day){
array_push($day_array, $day);
}
if i write a code like above, the $day_array will return like this:
Array (
[0] => 31
[1] => 30
[2] => 29
[3] => 28
and so on...
is there a solution to make 'my array key' and 'my key value' has the same value like this one
$day_array = array(
'31' => '31',
'30' => '30',
'29' => '29'
and so on...
);
thanks.. i need help...