Description:
Returns either true or false based on whether or not a key in an array is the last element.
Common Location:
/cms_admin/phptemplate/<templatefolder>/functions/standard.tpl
Usage:
<?php
$names = ["Anne", "Beth", "Carol", "Denise"];
foreach($names as $key => $name)
{
echo $name;
if (!last($sets, $key)) echo ", ";
}
?>
In this case, a comma will be printed after each name, unless the element is the last name.
Arguments
1) The full array
2) The key of the array.
Output
Anne, Beth, Carol, Denise