Categories:
.NET (357)
C (330)
C++ (184)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (2)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
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
✍: 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
2007-04-20, 5018👍, 0💬
Popular Posts:
How can you implement MVC pattern in ASP.NET? The main purpose using MVC pattern is to decouple the ...
What is AL.EXE and RESGEN.EXE? In the previous question you have seen how we can use resource files ...
How To Wirte a Simple JUnit Test Class? This is a common test in a job interview. You should be able...
What Is the "@SuiteClasses" Annotation? "@SuiteClasses" is a class annotation defined in JUnit 4.4 i...
What Are Named Parameters? - Oracle DBA FAQ - Creating Your Own PL/SQL Procedures and Functions Name...