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

Find occurences of unicode characters in string
I need to prohibit filenames with everything but English characters and numbers but regexp and strin

problems with search form numerical "between" sending by php
I am trying to display the results of a search, on a sql database, on a web page. I set up html &quo

Add 5 to a variable when a button is clicked, and re-run a for loop
So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to

bind error during socket programming
i am kinda new to socket programming. wrote the below code for a server. but getting the bind error

Warning: mysql_num_rows() expects parameter 1
When i add quote at the end of this link
example:http://localhost/articlemania/category.php?cid=3

GET vs SUBMIT Button to show sections on one index.php page?
Just curious if one of these ways is better (i.e. more efficient) than the other.

I have a

Using loop to count number of entries
I'm writing a program that must ask user to type in numbers. After each entry, the program has to re

please help me... my password gets encrypted but not able to get in database
hai guys,
please help me... in the following function my password gets encrypted but no

Sequencing or queuing parallel process
Scenario is as follows
There is one parent process say P1 and 4 child processes say A B C D

question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.

I hav

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