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

convert PHP array to Javascript array
I have a page that gets a request sent from AJAX, and I am trying to convert a PHP array to a javasc

Quick Syntax Question
Hi folks,

I'm getting the following error: "unexpected T_LNUMBER". I'm trying to b

I am stumped
OK. Here is what I am trying to do. I have the conditions set, and if the conditions are met, I want

Is this possible? If one file assigned to an ID...
I have a page that lists property listings assigned to a specific user (a manage page), with brief t

a dificult string search
Hi I don't know a way around this. I want the user to input a password, but to make it a bit complca

Php WordPress help
I am writing the following code for making a plugin

<?php
header("Content-Type

IS Retail & Manufacturing
Hi

Can IS Retail and Manufacturing activities be done in same instance ie. in same client

strptime() equivalent for php4 ?!
Greetings!

this is my first post, thank you in advance for your replies.

Well, the ti

Functions Not Loading Into Div
I had some help doing some of this but what I'm trying to do is get my functions to retrieve its val

displaying unknown amount of results
I am reading a directory and getting a list of folders in the directory, I want to display the folde

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