PHP
  Home arrow PHP arrow Page 2 - Arrays and PHP: A Primer
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Arrays and PHP: A Primer
By: Tuna Celik
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 25
    2001-12-20

    Table of Contents:
  • Arrays and PHP: A Primer
  • The fundamentals of memory allocation
  • Arrays and their uses
  • Single dimension arrays
  • Multi-dimensional arrays
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Arrays and PHP: A Primer - The fundamentals of memory allocation


    (Page 2 of 6 )

    The diagram shown below illustrates an abstract setup of a row of computer memory. The "Space" rows contain the memory address, while the "Values" rows contain the actual data, which is stored at that address:

    Memory Spaces Example

    For example, if we were to declare a variable named "arthur" in PHP like this:

    <?php

    $Arthur = "Value Entered";

    ?>


    Then this would be represented in our computers memory, like this:

    Data representation in computer memory

    Notice how the memory address has been replaced with "Arthur". The variable "$Arthur" is simply an alias for the real memory address where the value "Value Entered" is stored. If we were to point the variable $Arthur to another value, like this:

    <?php

    $Arthur = "New Value";

    ?>


    Then the memory address of the $Arthur variable would remain the same, and its value would be changed to "New Value".

    More PHP Articles
    More By Tuna Celik


     

    PHP ARTICLES

    - Making Usage Statistics in PHP
    - Installing PHP under Windows: Further Config...
    - File Version Management in PHP
    - Statistical View of Data in a Clustered Bar ...
    - Creating a Multi-File Upload Script in PHP
    - Executing Microsoft SQL Server Stored Proced...
    - Code 10x More Efficiently Using Data Access ...
    - A Few Tips for Speeding Up PHP Code
    - The Modular Web Page
    - Quick E-Commerce with PHP and PayPal
    - Regression Testing With JMeter
    - Building an Iterator with PHP
    - PHP Frontend to ImageMagick
    - Using PEAR's mimeDecode Module
    - Incoming Mail and PHP







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 9 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek