Welcome to PHPMule.com
A blog site which I am posting to during my learning of the popular programming language PHP. Feel free to leave comments!
-
PHP - Using Arrays (Numerically Indexed)
An array is a variable that can store a set of values.
Numerically Indexed Arrays
If you wanted to store a set of values in one variable we could do that as follows:
$celebrity_array[0] = “Bruce Willis”;
$celebrity_array[1] = “Arnold Swarzennegar”;
$celebrity_array[2] = “Matt Damon”;
$celebrity_array[3] = “Liam Neeson”;
If we then wanted to reference to this we could use these lines:
echo “A well known action hero is ” . $celebrity_array[0] . ” and ” . $celebrity_array[3] . ” is pretty good as well! “;
You will also notice that the counter starts at ‘[0]‘ and it’s something you would have to get used to if you haven’t seen an array before.
Arrays obviously save time and it will make your code look a little tidier. I will go more into arrays in the next blog post as I’m still learning
(Post created on Thursday, April 9th 09 at 15:35)
2 Trackbacks / Pingbacks
-
Buy:Viagra Soft Tabs.VPXL.Viagra Professional.Cialis Soft Tabs.Maxaman.Cialis Super Active+.Zithromax.Viagra.Propecia.Soma.Levitra.Cialis.Super Active ED Pack.Viagra Super Active+.Tramadol.Viagra Super Force.Cialis Professional….
-
Buy:Valtrex.Petcam (Metacam) Oral Suspension.Lumigan.Zyban.Retin-A.100% Pure Okinawan Coral Calcium.Synthroid.Prevacid.Prednisolone.Human Growth Hormone.Arimidex.Zovirax.Actos.Accutane.Mega Hoodia.Nexium….
Leave a reply
-
-
Archives
Recent Articles
- PHP - Rounding Off Numbers
- PHP - Single vs Double Quotation Marks
- PHP - Loading Files Into Your PHP Script By Using require() and include()
- PHP - Replacing Strings With Other Strings
- PHP - Finding Strings Within Strings
- PHP - Using strlen() To Test String Length
- PHP - Using The explode() Function
- PHP - Changing The String Case
- PHP - The nl2br() Function
- PHP - Trimming Strings
Links
Categories
- PHP (22)
- Uncategorized (1)



BRENT September 5th, 2010 at 20:13