|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
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? |
|
#2
|
||||
|
||||
|
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. |
![]() |
| Viewing: Codewalkers Forums > Forum Information > Suggestions & Feedback > Array Tutorial by Matt Wade |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|