EACHMULTI / SETMULTI
by Adrian Fitton, December 5, 2008 05:22
hello I'm just trying to write a function that is similar to the PHP implode function. If you're not familiar with it, it takes an array, and separates each value with a given delimiter.
i.e. in my example I am expecting the output string of "1&2&" (but in the end that trailing "&" will be trimmed off)
My problem is that the EACHMULTI just keeps on showing me the first value of "result"... which is "1".
So this is what i've done so far :
<% FUNCTION implode(theSeperator, result); EACHMULTI result; set theresult=$result$$theSeperator$; ENDMULTI; RETURN $theresult$; %>
'fill the array <%SETMULTI result="1", result="2";%>
'call the function $implode('&', $result$)
could you point out what I am doing wrong?
Name E-mail optional TopicMessage:
HTTP Link: Link text: