- 1

Why cant i use double quotes in array's?

hai there, when i am writing a program for 2 dimensional array,the result isnt showing if i use double quotes...but when i change it to single quotes it worked...but why and when should i use double and single quotes ? thank u

28th Feb 2017, 3:46 AM
preeth_learner
preeth_learner - avatar
5 odpowiedzi
+ 1
Double and single can use on array. As far I know.. Maybe you must check open and close quote.
28th Feb 2017, 3:58 AM
Ace
Ace - avatar
+ 1
Post your code here.
28th Feb 2017, 9:23 AM
Dev
Dev - avatar
+ 1
you can use single or double quotes inside the array
2nd Mar 2017, 3:38 PM
Vimalan Kumarakulasingam
Vimalan Kumarakulasingam - avatar
0
yeah i did.. and only double quotes are working
28th Feb 2017, 9:20 AM
preeth_learner
preeth_learner - avatar
- 1
<?php $people = array( 'online'=>array('David', 'Amy'), 'offline'=>array('John', 'Rob', 'Jack'), 'away'=>array('Arthur', 'Daniel') ); echo $people['online'][0]; echo "<br />"; echo $people['away'][1]; ?> take this as example...when i use double quotes in the place of every single quotes,its giveing an error...so where and when to use double nd single quotes ? thank you
28th Feb 2017, 9:28 AM
preeth_learner
preeth_learner - avatar