-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...
/* 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...
?
$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,
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 =
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:
-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
"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??
7 matches
Mail list logo