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

Undefined index: username HELP NEWBIE
I am trying a simple login/logout for my website. It works well with checking if the username exists

URL Rewrite issue
Im created a series of Rewrites and on page checks to make sure the correct url is being called. But

$get problem
Hi Guys ...

can you please tell me what i am doing wrong here
Code: <?php

Wierd echo error?
Hi, i got the most wierd php error ever and i don't know why..
Code: echo "<t

validating url
im trying to validate url's sent to me by a form
the url's im collecting are for placing banners

Pass sql into pl/sql and create RMAN duplicate script.
Hi,

I'm new to pl/sql and I'm trying to write a script that will generate some RMAN comma

Confused with Loop
guys, i got confused with Looping...this is the case

I have 3 stocks, let say "Stock A&q

Remove letter from numeric textbox
I have a textbox that will search the employee database by entering in the employee ID and it will r

filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I h

Refining of search Criteria
Dear Friends

I need a help, I have a search page which of cars related, which has different s

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