New to PHP and just trying to understand a little code.


Posted on 16th Feb 2014 07:03 pm by admin

I hope I'm not annoying anyone or breaking the rules but I was wondering about this bit of code right here:
" <?php
$people = Array(
Array('name' => 'Kalle', 'salt' => 856412),
Array('name' => 'Pierre', 'salt' => 215863)
);
for($i = 0; $i < sizeof($people); ++$i)
{
$people[$i]['salt'] = rand(000000, 999999);
}
?> "

Okay from what I can get from this $i will continue to increase and the code will execute until ..... this seems too random or me to realize the goal of this code.

No comments posted yet

Your Answer:

Login to answer
187 Like 30 Dislike
Previous forums Next forums
Other forums

that old Malformed Headers problem again!!!!! HELP!!!!!!
I've read the http://www.phpfreaks.com/forums/index.php/topic,37442.0.html

I don't think my c

Having a problem get the selected item from a drop down menu
I have been looking at this for days now.

I have a drop down menu that get it's values from a

Need help in Generating Combinations
Need help generating all possible combination of names in an array

Lets say i have the follow

Drop Down and text box issue
Is it possible to set a drop down list and text boxes to a certain width?

here is my code

start new row of pictures
on my site www.budstreasureauctions.com there is a featured auctions box that users will pay to get

Had a simple form script that suddenly stopped working
It was made about a year ago and had been working fine. Last time it was known to work for sure was

Displaying returned XML in another PHP page
I have an online payment form that will return XML given if a payment is successful or declines. I

PRotect my POST DATA... FROM HTML ATTACKS
I need to like let's say

If a user submit's his Prayer and he put's <meta refresh stuf

Effort Estimation Template for Steady State Support
Hi Everyone,

Is there any SAP provided template/format for system change and enhancements

Parse error: parse error in C:wampwwwlogspagesmembers.php on line 16
I dont see the problem with this, I always get Parse error: parse error in C:wampwwwlogspagesme

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash