私は次の配列を持っていて、それをphpでループして、「タイプ」のリストを生成し、その数を数えようとしています。Type がキーですが、Call、To-do、Meeting、Proposal などの固有の値があります。私の目標は、次の出力を得ることです。
Call 2
To-do 1
Meeting 3
Proposal 4
上記は、次の配列から出力される値ではありませんが、私が達成しようとしていることを理解してもらいたいと思います。助けてください!
Array (
[0] => Array (
[0] => Call
[Type] => Call
[1] => fxxxx@xxxxentllc.com
[EmailAddress] => xxxxr@xxxxentllc.com
[2] => 3xxxx00
[Phone] => 31xxxx00
[3] => 31xxxx871
[MobilePhone] => 31xxxx871
[4] => 102795
[CustomerID] => 102795
[5] => Nortxxxxal
[Company] => Noxxxxal
[6] => Frank
[FirstName] => Frank
[7] => Syxxxxer
[LastName] => Sxxxxter
[8] => 3
[Priority] => 3
[9] => invite to Haxxxxales for lunch
[Details] => invite to Hafxxxxales for lunch
[10] => 4503
[ActivityID] => 4503
[11] => 05/23/13
[DueDate] => 05/23/13
)
[1] => Array (
[0] => To-do
[Type] => To-do
[1] => fsxxxxer@summxxxxntllc.com
[EmailAddress] => fsxxxxer@summixxxxtllc.com
[2] => 315xxxx000
[Phone] => 3154xxxx0
[3] => 315xxxx1
[MobilePhone] => 315xxxx1
[4] => 102795
[CustomerID] => 102795
[5] => Norxxxxl
[Company] => Norxxxxcal
[6] => Frxxxxk
[FirstName] => Fxxxxk
[7] => Sxxxxr
[LastName] => Syxxxxer
[8] => 3
[Priority] => 3
[9] => find out who contact is for xxxxdical center
[Details] => find out who contact is foxxxxcal center
[10] => 4504
[ActivityID] => 4504
[11] => 05/23/13
[DueDate] => 05/23/13
)
)