Why its keep say "Oops, try again. It looks like your code didn't print 'apples'."


#1

<?php
$fruitsArray=array('apples', 'bananas', 'pears');
echo 'I love eating ' . $fruits[1] . ' too!';
?>


#2

Have you defined this array

anywhere in your code?


#3

ok, I get it:slightly_smiling: thanks


#4

Can i ask you what the fix is?


#5

@lilyha
Make sure to print the "apples" element in your $fruits array. Remember the index starts at 0 for the first element in the array. Here

You print "bananas" the second element in your array.