-
PHP array()
Definition and Usage
array() creates an array, with keys and values. If you skip the keys when you specify an array, an integer key is generated, starting at 0 and increases by 1 for each value.
Example 1
<?php
$a=array("a"=>"Dog","b"=>"Cat","c"=>"Horse");
print_r($a);
?>
The output of the code above will be:
Array ( [a] => Dog [b] => Cat [c] => Horse )
Example 2
<?php
$a=array("Dog","Cat","Horse");
print_r($a);
?>
The output of the code above will be:
Array ( [0] => Dog [1] => Cat [2] => Horse )
visit us:
[SPAM REMOVED]
Last edited by djr33; 06-09-2010 at 06:21 PM.
-
The Following User Says Thank You to itxen For This Useful Post:
-
hello friend
i am jaydeep dave. i am working as php web development. i need help that i want to create dynamic category so how i create which can i added through database.
-
-
The post that you replied to is spam. I removed the spam link, but I left this thread so that I did not delete your question, but I am going to CLOSE this conversation because you should start a new topic for your question. Also, please post more information. Are you using a database? Is this related to arrays? What are your goals? Can you link to your website?
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
The Following User Says Thank You to djr33 For This Useful Post:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks