ODBiC Discussion Board


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?

thanks

Adrian


Replies:


Post Your Reply:

Name   
E-mail  optional
Topic  
Message:

HTTP Link: 
Link text: 

          


Copyright ©1997-2003, Roger Harris. All rights reserved.