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),
Did you know?Explore Trending and Topic pages for more stories like this.
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

how to easy edit text, with box? Help.
Hi.
I have a little problem. I'm doing a webpage for my aunt and I would like to make it as easy

Struct/union and scope problem!
HI all , I have
Code: in header.h typedef struct Node Link; /* ---------

php require help needed
Ok i tried to use the search funtion but the word require is everywhere.

i'm really new to cr

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

Access website from only 1 computer...?
One of my customers wants his website to only be accessed by people in which they bought the website

The page should be expire when cilck back button
hi,
i'm new to php world.
i create user registration page.
when i submit it,data goes to my

extending tidy
I have problem with type-hinting and extending tidy. This code creates error:
Code: class cMyTidy

Problem with "dynamic" index page
Hi. I have one question. In my index.php page I have this kind of code:
Code: // listaa sivut

post to self
Trying to get my form to submit to itself. However I am also trying to use an image for my submit bu

Turning Data into URLs?
This may seem very basic to you, but I'm having a hard time figuring out how to do this since I don'

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