- 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
5 Respostas
+ 1
Double and single can use on array. As far I know.. Maybe you must check open and close quote.
+ 1
Post your code here.
+ 1
you can use single or double quotes inside the array
0
yeah i did.. and only double quotes are working
- 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