I am setting a array in my controller by:
$messages = array("Apples", "Oranges", "Pears");
$this->set('messages', "$messages");
However then in my View if I try to print the array with:
<?php
print_r($messages);
?>
I just get the word 'Array' not the actual content of the array.
Trying to access elements of the array does not seem to work either, for example:
echo $messages[0];
gives 'A'