Suggestions & Feedback
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsForum InformationSuggestions & Feedback

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old October 7th, 2003, 02:49 PM
dedoleo dedoleo is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Dana Point, CA USA
Posts: 1 dedoleo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to dedoleo Send a message via AIM to dedoleo Send a message via Yahoo to dedoleo
Array Tutorial by Matt Wade

I appreciate this tutorial.

The second to last example,

<?PHP
$books = array(0=>array('name'='A Book','price'=>9.99),1=>array('name'='Another Book','price'=>17.99));
?>

gave me an error.

I'm not hip with PHP. However, changing the 'name'='A Book' and 'name'='Another Book' to => instead of = seemed to solve the problem.

What is the significance of => ? It seems confusing to me because I see it as "equal to or greater than". Is the => supposed to represent an arrow?

Reply With Quote
  #2  
Old October 7th, 2003, 03:37 PM
tkarkkainen's Avatar
tkarkkainen tkarkkainen is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: Finland
Posts: 2,320 tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 10987 Folding Title: Novice Folder
Time spent in forums: 6 Days 8 h 49 m 26 sec
Reputation Power: 4
RE: Array Tutorial by Matt Wade

In this case it does represent an arrow (in mathematics => means "this causes the following".)

$books=array('name'=>'book','price'=>9.99);

After this line you can use the following code:

echo $books['name'] . ": ";
echo $books['price'] . "<br>n";

and it will output:

book: 9.99

I hope it now makes some sense to you.

Reply With Quote
Reply

Viewing: Codewalkers ForumsForum InformationSuggestions & Feedback > Array Tutorial by Matt Wade


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway