I'm trying to allow the user to check off which pictures they want to include in an album so I'm trying to  have the form store an array of image guids that are to be included in the album. I was hoping someone could help me out with the syntax (below is what I thought the code should look like). Thanks in advance! 

foreach ($image_guids as $key => $image_guid) {
$image = get_entity($image_guid);

$select = $image->select;

echo elgg_view("input/checkboxes", array("internalname" => "select[$key]",
"value" => $select,
'options' => array( elgg_echo('album:choose') => $image_guid),));