PHP Array - How To Retrieve Values out of an Array
Interview Question Database For Software Developers
|
|
| How To Retrieve Values out of an Array | | How To Retrieve Values out of an Array? - PHP Script Tips - Understanding PHP Arrays and Their Basic Operations | | By: FYIcenter.com | You can retrieve values out of arrays using the array element expression $array[$key].
Here is a PHP example script:
<?php
$languages = array();
$languages["Zero"] = "PHP";
$languages["One"] = "Perl";
$languages["Two"] = "Java";
print("Array with inserted values:\n");
print_r($languages);
?>
This script will print:
Array with default keys:
The second value: Perl
Array with specified keys:
The third value: Java
| | ID: 271 | Rank: 1100 | Votes: 0 | Views: 50 | Submitted: 20070420 |
1118 :-) | | How To Create an Array | | How To Create an Array? - PHP Script Tips - Understanding PHP Arrays and Their Basic Operations... | | Submitted: 20070420 |
|
1086 :-) | | How Values in Arrays Are Indexed | | How Values in Arrays Are Indexed? - PHP Script Tips - Understanding PHP Arrays and Their Basic Operations... | | Submitted: 20070420 |
|
Copyright © 2009 FYIcenter.com
All rights in the contents of this Website are reserved by the individual author.
No part of the contents may be reproduced in any form without author's permission.
|
|
|