RE: [PHP] Create Array??

2001-09-23 Thread Andrew Braund
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, 23 September 2001 15:39 To: [EMAIL PROTECTED] Subject: [PHP] Create Array?? Hi, If I have a value $num = 32; based on this how can I create an Array of numbers 1 - 32, something like this...

Re: [PHP] Create Array??

2001-09-23 Thread Evan Nemerson
/* Untested */ $num = 32; $i=Array(); for($x=1;$x=$num;$x++) { $temp[$x]=0; }; $i=array_keys($temp); unset($temp); On Saturday 22 September 2001 23:09, you wrote: Hi, If I have a value $num = 32; based on this how can I create an Array of numbers 1 - 32, something like this... ?

Re: [PHP] Create Array??

2001-09-23 Thread Evan Nemerson
$i=Array(); would probably be better as $temp=Array(); although i THINK either one is redundant... sorry /* Untested */ $num = 32; $i=Array(); for($x=1;$x=$num;$x++) { $temp[$x]=0; }; $i=array_keys($temp); unset($temp); On Saturday 22 September 2001 23:09, you wrote: Hi,

Re: [PHP] Create Array?? More

2001-09-23 Thread KPortsmout
Ok, Thanks for the input, unfortunately it didn't help me solve my overall problem, so I will post that and see if anyone has any suggestions... I am basically displaying the Usernames from a .htpasswd file like this... $File=$Path$Directory1/.htpasswd; $fd = fopen ($File, r); $Content =

Re: [PHP] Create Array??

2001-09-23 Thread Alexander Skwar
So sprach »[EMAIL PROTECTED]« am 2001-09-23 um 02:09:17 -0400 : Hi, If I have a value $num = 32; based on this how can I create an Array of numbers 1 - 32, something like this... ? $num = 32; $arr = array(); for ($i = 1; $i = $num; $i++) $arr[] = $i; Alexander Skwar -- How to quote:

RE: [PHP] Create Array?? More

2001-09-23 Thread Andrew Braund
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, 23 September 2001 16:46 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Create Array?? More Ok, Thanks for the input, unfortunately it didn't help me solve my overall problem

Re: [PHP] create array of random unique integers?

2001-02-18 Thread Robin Vickery
"a" == andrew [EMAIL PROTECTED] writes: Hi, is there a quick way to create an array of integers, randomized and without repeats? e.g. if my set is 1 - 10, create an array whoese key values are 1 through 10, with corresponding key values as a random set of the same 1 through 10??