Hari ini :
You are not log in? >> Please Login

ArraySwap function example: how to swap array values of an array at specified positions

ArraySwap.cfm






<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>ArraySwap function example: how to swap array values of an array at specified positions</title>
</head>

<body>
<h2 style="color:Green">ArraySwap Function Example</h2>

<cfset ColorArray = ArrayNew(1)>
<cfset ArrayAppend(ColorArray,"Red")>

<cfset ArrayAppend(ColorArray,"Green")>
<cfset ArrayAppend(ColorArray,"Blue")>
<cfdump var="#ColorArray#" label="ColorArray">

<br />
<cfset Temp = ArraySwap(ColorArray,1,3)>
<cfdump var="#ColorArray#" label="ColorArray[After Swap Position 1,3]">
</body>
</html>








http://coldfusion-example.blogspot.com/

About this entry

 

Author Contact | Powered By Blogspot | © Copyright  2009