Code2Design.com

User login

The Layout

Programming

Graphic Design

Resources

Navigation

C2D Projects

Unsystematic Affiliates

Learn PHP Free Proof That God Exists Tarnic Adobe Tutorialz 

Change Language

Who's online

There are currently 0 users and 19 guests online.

Beginning PHP Tutorials

Arrays by reference

I have been using lots of functions to create and check my variables and arrays lately. Along these lines, I thought I would take some time to share how the concept of "passing values by reference" works.

Basically, if you are anything like me you are always passing functions values and then having that function "return" a value. While there is nothing wrong with this approach, there is often an easier way to work with values in functions. Besides making values "global", you can also pass a function a value by reference.

Here is the standard way most people would work with a value in a function and then collect the functions return value.


Submitted by David on January 17, 2008 - 8:18pm.
read more | 1 comment

Syndicate content


Like what you see?

Why not add more? C2D is looking for other Christian Web Masters who would like to help write articles for this site. If you have expericance in FLASH, CSS/HTML, PHP/MySQL, PhotoShop/GIMP, Blender, Javascript, or just General Design - our users would love to hear what you have to say. Contact Us

delicious   digg   reddit   magnoliacom   newsvine   furl   google   yahoo   technorati