|
Posted by zebul0n on 08/06/07 14:44
> Maybe, you should try prepare own function, for example:
>
> $array = array('2' => '27584.10', '3' => '1008.00', '6' => 11393.55,
> '7' => 888.12);
>
> for ($i=0; $i<12; $i++){
> if (!array_key_exists($i)) $array[$i] = 0;
> }
>
> Regards,
> Marcin
Hello Marcin,
Thank you !
I was indeed using your solution but didn't know how to fill the empty
value.
Instead of using : $array[$i] = 0;
I was fighting with function like array_map. I was searching for
complication, because I wanted to fill the empty values at the right key
place.
Putting the values at the end of the array was the solution.
Now I just have to ksort() the array.
Thank you for your help and pointed me to the right direction.
Regards.
Navigation:
[Reply to this message]
|