Created
May 27, 2015 13:19
-
-
Save luzzardi/d492b534848e0af36f20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$matriz = array(); // [] significa iniciar um array vazio em php. | |
$i = 0; // Indice da matriz inicial | |
$j = 0; // php nao tem definição de tipos, ele vai assumir o valor que eu passar, no caso i e j serão Inteiros (int) | |
for ($i = 0; $i < 10; $i++) { | |
for ($j = 0; $j < 10; $j++) { | |
matriz[$i][$j] = rand(); // PHP tem a função rand que retorna um numero random. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment