Created
February 7, 2017 14:18
-
-
Save YurePereira/24b822b99d2191c45db57f5bd5c99a45 to your computer and use it in GitHub Desktop.
Acessando o primeiro elemento do Array
This file contains hidden or 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 | |
| $myNumericArray = array( | |
| 100,// Tipo de dado numérico | |
| new DateTime(),// Tipo de dado Object | |
| 'String Any',// Tipo de dado String | |
| 89, | |
| 90 | |
| ); | |
| //Acessando o primeiro elemento do Array: | |
| echo $myNumericArray[0]; | |
| //Segundo elemento | |
| echo $myNumericArray[1]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
echo $myNumericArray[1]; // object of class DateTime could not be converted to string