Created
August 4, 2013 19:05
-
-
Save sohelrana820/6151481 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 | |
$MyArray = array('Name'=>'Rana','ID'=>'092-15-820','Batch'=>'23'); | |
// If you want to echo the name just write "echo $MyArray['Name']"; | |
echo $MyArray['Name']; | |
//Another way | |
$MyArray2 = array('Rana','092-15-820','23'); | |
// If you want to echo the name just write "echo $MyArray2[0]"; | |
echo $MyArray2[0]; | |
//The only different between two array is indexing. First one is Indexing with (Name,ID,Batch) | |
//And the second one is not indexing, if we are not indexed the array the we need to access with default(0,1,2,.....) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment