Re: [PHP] Middle Number

2002-12-07 Thread Stephen
] Middle Number At 09:45 PM 12/6/02 -0500, Stephen wrote: How can you find the meadian (or middle number) of a list of numbers? If there is an even amount of numbers, how would I still find it? load the list into an array, in numeric order... then: $List = array( 1,2,3,4,5,6 ); $Middle

Re: [PHP] Middle Number

2002-12-07 Thread Rick Widmer
At 07:05 PM 12/7/02 -0500, Stephen wrote: Wouldn't this only work for an even ammount of numbers? Like 1, 2, 3, 4 has 4 numbers... Did you try it? I'd hate to think I've done more work to solve your problem than you have... Even: $List = array( 1,2,3,4,5,6 ); $Middle = ( count( $List )

[PHP] Middle Number

2002-12-06 Thread Stephen
How can you find the meadian (or middle number) of a list of numbers? If there is an even amount of numbers, how would I still find it? Thanks, Stephen Craton http://www.melchior.us What is a dreamer that cannot persevere? -- http://www.melchior.us -- PHP General Mailing List

Re: [PHP] Middle Number

2002-12-06 Thread Rick Widmer
At 09:45 PM 12/6/02 -0500, Stephen wrote: How can you find the meadian (or middle number) of a list of numbers? If there is an even amount of numbers, how would I still find it? load the list into an array, in numeric order... then: $List = array( 1,2,3,4,5,6 ); $Middle = ( count( $List ) -