hi guys..
wow.. this week, i've been having fun in experimenting with array
ya know.. as a noob.. it is really fascinating what this array thing can do..
ok... here's the latest thing that puzzles me..
$my_array = array('apple', 'lemon', 'bananas');
foreach ($my_array as $fruits) {
echo $fruits;
echo "<BR>";
}
now, this will output the following:
apple
lemon
bananas
My question is : Why isnt THIS working???
$fruit_array = " 'apple', 'lemon', 'bananas' "
$my_array = array($fruit_array);
foreach ($my_array as $fruits) {
echo $fruits;
echo "<BR>";
}
Any Idea guys???
Thanks in advanced!!
cheers;
-jassh