tedd wrote:
Rob:
You're never confused because you are always right.
I should have you mention this to my wife... I'll provide the helmet >:)
Congrats, you were the first to solve this problem this simply.
To tell the truth, I didn't fully understand how array_multisort()
worked until I re
At 10:26 AM -0400 4/8/10, Robert Cummings wrote:
tedd wrote:
At 8:28 AM -0400 4/8/10, Andrew Ballard wrote:
On Wed, Apr 7, 2010 at 6:46 PM, Ryan Sun wrote:
>
rsort(array_combine(array2, array1));
you should expect array(
'Personal Email' => 75,
'USPS mail' => 40,
'Personal Phone' =
tedd wrote:
At 8:28 AM -0400 4/8/10, Andrew Ballard wrote:
On Wed, Apr 7, 2010 at 6:46 PM, Ryan Sun wrote:
>
rsort(array_combine(array2, array1));
you should expect array(
'Personal Email' => 75,
'USPS mail' => 40,
'Personal Phone' => 31,
'Web site' => 31,
'Text Message' => 31
On Thu, Apr 8, 2010 at 9:55 AM, tedd wrote:
> At 8:28 AM -0400 4/8/10, Andrew Ballard wrote:
>>
>> On Wed, Apr 7, 2010 at 6:46 PM, Ryan Sun wrote:
>>
>> >
>>>
>>> rsort(array_combine(array2, array1));
>>>
>>> you should expect array(
>>> 'Personal Email' => 75,
>>> 'USPS mail' => 40,
>>> 'P
At 8:28 AM -0400 4/8/10, Andrew Ballard wrote:
On Wed, Apr 7, 2010 at 6:46 PM, Ryan Sun wrote:
>
rsort(array_combine(array2, array1));
you should expect array(
'Personal Email' => 75,
'USPS mail' => 40,
'Personal Phone' => 31,
'Web site' => 31,
'Text Message' => 31
)
logically
At 6:46 PM -0400 4/7/10, Ryan Sun wrote:
rsort(array_combine(array2, array1));
you should expect array(
'Personal Email' => 75,
'USPS mail' => 40,
'Personal Phone' => 31,
'Web site' => 31,
'Text Message' => 31
)
logically, the items are your key but not the count of votes
Logically
On Wed, Apr 7, 2010 at 6:46 PM, Ryan Sun wrote:
> On Wed, Apr 7, 2010 at 6:29 PM, tedd wrote:
[snip]
>>
>> Let's look at the problem again (a vote collection problem):
>>
>> Array 1
>> (
>> [1] => 75
>> [2] => 31
>> [3] => 31
>> [4] => 31
>> [5] => 40
>> )
>>
>> Array 1 is an arr
rsort(array_combine(array2, array1));
you should expect array(
'Personal Email' => 75,
'USPS mail' => 40,
'Personal Phone' => 31,
'Web site' => 31,
'Text Message' => 31
)
logically, the items are your key but not the count of votes
On Wed, Apr 7, 2010 at 6:29 PM, tedd wrote:
> At 5:3
At 5:35 PM -0400 4/7/10, Andrew Ballard wrote:
On Wed, Apr 7, 2010 at 5:02 PM, Paul M Foster wrote:
Array indexes have to be unique regardless of whether they are numeric
or strings.
Ahhh, so you start to see the problem, eh?
Let's look at the problem again (a vote collection problem):
Array
Try this insted
array(
[0]=>array( [0]=>75, [1] => Personal Email)
[1]=>array( [0]=>31, [1] => Personal Phone)
[2]=>array( [0]=>31, [1] => Web site)
[3]=>array( [0]=>31, [1] => Text Message)
[4]=>array( [0]=>40, [1] => USPS mail)
MvH / Hans Åhlin
Tel: +46761488019
http://www.kronan-net.com/
irc:/
On Wed, Apr 7, 2010 at 5:02 PM, Paul M Foster wrote:
> On Wed, Apr 07, 2010 at 04:09:47PM -0400, tedd wrote:
>
>> Hi gang:
>>
>> Here's the problem -- I want to sort and combine two arrays into one
>> sorted array. Here's a real-world example:
>>
>> Array 1
>> (
>> [1] => 75
>> [2] => 31
>
On Wed, Apr 07, 2010 at 04:09:47PM -0400, tedd wrote:
> Hi gang:
>
> Here's the problem -- I want to sort and combine two arrays into one
> sorted array. Here's a real-world example:
>
> Array 1
> (
> [1] => 75
> [2] => 31
> [3] => 31
> [4] => 31
> [5] => 40
> )
>
> Array 2
> (
Piero Steinger wrote:
Am 07.04.2010 22:09, schrieb tedd:
Hi gang:
Here's the problem -- I want to sort and combine two arrays into one
sorted array. Here's a real-world example:
Array 1
(
[1] => 75
[2] => 31
[3] => 31
[4] => 31
[5] => 40
)
Array 2
(
[1] => Personal
Am 07.04.2010 22:09, schrieb tedd:
> Hi gang:
>
> Here's the problem -- I want to sort and combine two arrays into one
> sorted array. Here's a real-world example:
>
> Array 1
> (
> [1] => 75
> [2] => 31
> [3] => 31
> [4] => 31
> [5] => 40
> )
>
> Array 2
> (
> [1] => Person
14 matches
Mail list logo