420
ListLast
Returns the last element of the list.
See also
Syntax
ListLast( list [, delimiters ])
list
List whose last element is being retrieved.
delimiters
Set of delimiters used in list.
Examples
<!--- This example shows ListFirst, ListLast, and ListRest --->
<HTML>
<HEAD>
<TITLE>ListLast Example</TITLE>
</HEAD>
<BODY>
<H3>ListLast Example</H3>
<!--- Find a list of users who wrote messages --->
<CFQUERY NAME="GetMessageUser" DATASOURCE="cfsnippets">
SELECT
FROM
</CFQUERY>
<CFSET temp = ValueList(GetMessageUser.Username)>
<!--- Show the first user in the list --->
<P>The first user in the list is <CFOUTPUT>#ListFirst(temp)#
</CFOUTPUT>.
<P>The rest of the users in the list is as follows:
<CFOUTPUT>#ListRest(temp)#</CFOUTPUT>.
<P>The last user in the list is <CFOUTPUT>#ListLast(temp)#</CFOUTPUT>
</BODY>
</HTML>
ListGetAt
and ListFirst.
Username, Subject, Posted
Messages
CFML Language Reference
Need help?
Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?
Questions and answers