Re: [PHP] array_sum($result)=100

2006-09-25 Thread Ahmad Al-Twaijiry
Hi, This seems to be nice method, I tried to do translate it to PHP put since I'm bad in English I couldn't :) could you give me some prototype for the method. On 9/25/06, Google Kreme [EMAIL PROTECTED] wrote: On 24 Sep 2006, at 10:41 , Penthexquadium wrote: On Sun, 24 Sep 2006 19:06:11

Re: [PHP] array_sum($result)=100

2006-09-25 Thread Robin Vickery
On 24/09/06, Ahmad Al-Twaijiry [EMAIL PROTECTED] wrote: Hi everyone I have array of numbers and I want to get out of it a list of numbers that if I sum them it will be 100, here is my list (for example ) : $list = array(10,20,10,10,30,50,33,110,381,338,20,11,200,100); I want the result to be

Re: [PHP] array_sum($result)=100

2006-09-25 Thread Martin Alterisio
2006/9/25, Robin Vickery [EMAIL PROTECTED]: On 24/09/06, Ahmad Al-Twaijiry [EMAIL PROTECTED] wrote: Hi everyone I have array of numbers and I want to get out of it a list of numbers that if I sum them it will be 100, here is my list (for example ) : $list =

Re: [PHP] array_sum($result)=100

2006-09-25 Thread Robert Cummings
On Mon, 2006-09-25 at 16:42 +0100, Robin Vickery wrote: On 24/09/06, Ahmad Al-Twaijiry [EMAIL PROTECTED] wrote: Hi everyone I have array of numbers and I want to get out of it a list of numbers that if I sum them it will be 100, here is my list (for example ) : $list =

Re: [PHP] array_sum($result)=100

2006-09-25 Thread Ahmad Al-Twaijiry
Robin, you made it harder for me specially with wikipedia artical :) (I told you I'm bad with writing code from English paragraph) and no it's not a homework (btw: do they allow php in school ?, I remember we use basic :) ) anyway I will try to write the code and I will let you guys know (in the

Re: [PHP] array_sum($result)=100

2006-09-25 Thread Ahmad Al-Twaijiry
Finally I found a solution :) Thanks to Mr. Phil Rogaway I found a very small C++ code from Mr. Phil Rogaway in http://www.cs.ucdavis.edu/~rogaway/classes/122A/spring00/prog1.C I convert it to php and here is the result (I already test it, try it and let me know if you find any bug): //code

Re: [PHP] array_sum($result)=100

2006-09-25 Thread tedd
At 1:50 PM -0300 9/25/06, Martin Alterisio wrote: 2006/9/25, Robin Vickery [EMAIL PROTECTED]: On 24/09/06, Ahmad Al-Twaijiry [EMAIL PROTECTED] wrote: Hi everyone I have array of numbers and I want to get out of it a list of numbers that if I sum them it will be 100, here is my list (for

[PHP] array_sum($result)=100

2006-09-24 Thread Ahmad Al-Twaijiry
Hi everyone I have array of numbers and I want to get out of it a list of numbers that if I sum them it will be 100, here is my list (for example ) : $list = array(10,20,10,10,30,50,33,110,381,338,20,11,200,100); I want the result to be : $result = array( 10,20,10,10,50); as you can see in

Re: [PHP] array_sum($result)=100

2006-09-24 Thread Penthexquadium
On Sun, 24 Sep 2006 19:06:11 +0300, Ahmad Al-Twaijiry [EMAIL PROTECTED] wrote: Hi everyone I have array of numbers and I want to get out of it a list of numbers that if I sum them it will be 100, here is my list (for example ) : $list =

Re: [PHP] array_sum($result)=100

2006-09-24 Thread Google Kreme
On 24 Sep 2006, at 10:41 , Penthexquadium wrote: On Sun, 24 Sep 2006 19:06:11 +0300, Ahmad Al-Twaijiry [EMAIL PROTECTED] wrote: I have array of numbers and I want to get out of it a list of numbers that if I sum them it will be 100, here is my list (for example ) : I think you can try to