You are here: Re: creating a cumulative total column, but not in sequence « PHP Programming Language « IT news, forums, messages
Re: creating a cumulative total column, but not in sequence

Posted by mantrid on 12/31/07 16:18

"Ivαn Sαnchez Ortega" <ivansanchez-alg@rroba-escomposlinux.-.punto.-.org>
wrote in message news:fl6njf$crd$1@hercules.cohp1...
> mantrid wrote:
>
> > [key] => Array
> > (
> > [accum] => 1005.06506667
> > )
>
> It's $data[$key], not $data['key']. You want to access to a given array
> item, given its key.
>
> --
> ----------------------------------
> Ivαn Sαnchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
>
> Un ordenador no es un televisor ni un microondas, es una herramienta
> compleja.


I ve just discovered a problem.
When using

foreach($data as $item){
$data2[$item['selldate'] ] = $item;
}

ksort($data2);

to create the second array ordered by selldate, it is missing out any
records with duplicate selldates. How do I tell it to include duplicates?
Ian

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация