S
S
SuperDoker2016-02-13 11:02:19
Programming
SuperDoker, 2016-02-13 11:02:19

Why i?

Why is i the most popular variable in loops?

for ($i = 1; $i <= 10; $i++) {
    echo $i;
}

Where did it come from, any articles? Why did it happen. Just curious to know :)

Answer the question

In order to leave comments, you need to log in

7 answer(s)
D
Dmitry, 2016-02-13
@thewind

Iteration

E
Evgeny Simonenko, 2016-02-13
@easimonenko

i, jk are from mathematics. Goes apparently from Fortran. There, these variables are integer by default.

A
Alexander Shpak, 2016-02-13
@shpaker

Of course iterator

M
Mercury13, 2016-02-13
@Mercury13

index. From mathematics.

N
Neonoviiwolf, 2016-02-13
@Neonoviiwolf

Let's take "i", although no "i" suits us, let's take "m"

D
Dark Hole, 2016-02-13
@abyrkov

Throw in i. I use counter for this purpose. I don't confuse)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question