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

captcha error
I have been trying to implement a captcha in php...

here is the code..
Code: (php) [Select

losing variables between php brackets
Hi

have got this code:
Code: $id=mysql_result($result,0,"itemid");
$title=mys

Preventing SQL Injection
I have a question about SQL Injection, In some of our code we use this: view plaincopy to clipboa

unserialize help, getting errors
hi all ,
I got a form with 6 fields (2 input and 4 select box), when the page loads one block is

Expandable Post Code
Hi,

Hope you can help. Which currently I haven't upgraded to connect to a mysql server, so i

SAP Treasury - Commodities
We are running SAP ECC 6.0 with Treasury Activated.
EA-FIN is also activated (SFW5).

foreach result into a single variable
Hi,

I have this code...

Code: [Select]foreach ($_POST['Interests'] as $interest =&

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

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

A problem with my GD class
Hello,

I created a nice (and simple for now) GD class.
The problem is , it works great on

Array question
Does anyone know how to create a program that takes the $ amount for 8 different departments and gi

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