how can we store values generating in a for loop

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Locked
djdon11
Forum Commoner
Posts: 90
Joined: Wed Jun 20, 2007 5:03 pm

how can we store values generating in a for loop

Post by djdon11 »

HI Friends ...



i have a problem if anybody can solve this .....

Code: Select all

for($j=0;$j<4;$j++){	
		$rndval = date("s") ;
$rndval .= rand().rand().rand();
$rndval;
$rndval  = substr($rndval,0,9);

$password="";
for ($i=0;$i<9;$i++)
{
	$password .= chr(substr($rndval, $i,1)+105);
}

}
the above code is generating 5 unique passwords in a for loop .....

now i want to store all of these password in a variable & then how i can use these password out of this for loop ...


if anybody can help me out of this than i will be thankful to him/her


thanks ...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

This is being discussed in your previous thread, therefore does not need a new one. Locked.
Locked