2 Answers - Sort by: Date | Rating
Arrays are basically lists. So instead of a variable being just one of something, it can instead be a list of things.
An associative array is a special kind of list, where you are able to reference each item in the list by a predefined name. For example, if you have a list of telephone numbers, you could use the person's name as the 'key' in the associative array, to reference their phone number. In PHP you would write something like $phone_number = $contacts['John'] to get John's phone number.
An associative array is a special kind of list, where you are able to reference each item in the list by a predefined name. For example, if you have a list of telephone numbers, you could use the person's name as the 'key' in the associative array, to reference their phone number. In PHP you would write something like $phone_number = $contacts['John'] to get John's phone number.
0
0
Think of an array as a list of data items, each item being able to be referenced by its place in the list (array). So the array CITIES could be made up of the items (names in this case) Chicago, Detroit, Madison, and Indianapolis. A program could go through the list and do something with it. This is called a one dimensional array. If one wanted pairs of items, a two dimensional array could be created. And so forth.
An array can also be thought of as a file within a program. Indeed one could populate an array from a file, but an array's contents can also be hard-coded. Or be filled bt prompting the user for the data. And then something is done with it.
Arrays can be sorted, low to high or high to low depending on what's needed. Sometimes the programming/scripting language has this built in, but earlier languages required programmers to that manually.
An array can also be thought of as a file within a program. Indeed one could populate an array from a file, but an array's contents can also be hard-coded. Or be filled bt prompting the user for the data. And then something is done with it.
Arrays can be sorted, low to high or high to low depending on what's needed. Sometimes the programming/scripting language has this built in, but earlier languages required programmers to that manually.
0
0
- What Is Needed To Run A PHP Script?
- Writing Of Data To A Transaction Log Is Which ACID Property?
- When Did Japan Get Independence?
- What Is The Main Disadvantage Of Recursion?
- How Are Records Deleted To Ensure The Integrity And Consistancy Of A Database?
- What Are The Commands In Command Prompt(cmd.exe)?
- What Is Object Based Logical Model?
- What Is Difference Between Html And Rss Reader?
- What Are The Higher Normal Forms In Database?
- How To Construct A Flowchart That Will Compute And Print The Sum And Average Of Three Numbers?
- What Do I Do On Meez If It Says Your Input Is Not Correct And It Is?
- How Do I Enable Java Script Onto My Browser. My Cellphone Is A LG - LW310?
- What's An Equation For A Line That Has An X-int Of (6,0) And Y-int Of (0,4)?
- Data In MS Access Table Is Read Only - Need To Change So Can Edit Or Delete?
- How Can I Write The Program The Greatest The The Element In Array In C?
- What Is The Oldest Database Model?
- What Is The Oldest And Simplest Of The 5 Database Models?
- What Does The Term Data Independence Mean And Why Is It An Important Goal?
- In Which Phase Compiler Get Terminate?
- What Is 2-tier Architecture Of Database?
- How To Display Decimal In A Flow Chart?
- How Can I Use Dmp File In Java?
- You Are Writing A Database Application To Run On Your DBMS. You Do Not Want Your Users To Be Able To View The Underlying Table Structures. At The Same Time You Want To Allow Certain Update Operations?
- What I Need To Undergo If I Make A Program?
- What's Arrays?
- Why Do We Use Pointer Arrays In C++?
- What Is Photovoltaic? And Photovoltaic Arrays Are Used?
- In Computer How We Use Arrays ?
- What Is An Arrays In C Language?
- Are There Any Usefil Tips On Arrays For C++ ?
- What Is The Difference Between Datastructures And Arrays?
- Does Java Support Multidimensional Arrays Or Not?
- What Is The Difference Between Arrays And Hash In Perl?
- What Multiplication Fact Can Be Found By Using The Arrays For 2 X 9 And 5 X 9?
- What Multiplication Fact Can Be Found By Using The Arrays For 2 X 9 And 5 X 9?

New Comment - Comments are editable for 5 min.