Thanks Andrew, I will try your struct example.

Do you have any ideas regarding str_pad()

It takes three arguments, 1)the string to pad 2) the pad length and 3)
the padding

What it does is pad the string on the right with the specified padding
at the specified length. Here is an example from the manual:

<?php
$input = "Alien";
echo str_pad($input, 10);                      // produces "Alien    "
echo str_pad($input, 10, "-=", STR_PAD_LEFT);  // produces "-=-=-Alien"
echo str_pad($input, 10, "_", STR_PAD_BOTH);  // produces "__Alien___"
echo str_pad($input, 6 , "___");              // produces "Alien_"
?>

-Aaron

On 11/9/06, Andrew Scott <[EMAIL PROTECTED]> wrote:
> Ok I haven't an idea of the top of my head, but you would need to loop over
> the lsit and store in a struct
>
> or
>
> mystruct = structnew
> mystruct.a = listgetat(list,1);
> mystruct.b = listgetat(list,2);
> mystruct.c = listgetat(list,3);
>
> Now if you really wanted to be creative yo could create a UDF to pass the
> string and loop through and do this but natively no CF doesn't have this.
>
>
> On 11/10/06, Aaron Roberson <[EMAIL PROTECTED]> wrote:
> >
> > A = array(1732584193, 4023233417, 2562383102,  271733878, 3285377520);
> > list(a,b,c,d,e)=A;
> >
> > I added
> > A = arrayNew(1);
> > above this block of code.
> >
> > The first line of code is assigning the values to the array. The
> > second line of code uses the list() function to assing each value in
> > the array to the keys a,b,c,d,e so the result is this:
> > a = 1732584193
> > b = 4023233417
> > c = 2562383102
> > d = 271733878
> > e = 3285377520
> >
> > It should be simple to do in ColdFusion but I can't think of the solution.
> >
> > -Aaron
> >
> > On 11/9/06, Andrew Scott <[EMAIL PROTECTED]> wrote:
> > > Aaron not to be able to answer all your questions but a constant is a
> > > variable that does not change hence why they call it a constant
> > variable.
> > >
> > > So in answer to you there
> > >
> > > <cfif isDefined('Varaible') />
> > >
> > > Would check for the existance of that variable, the other way is
> > >
> > > <cfparam name="Variable" default="hello" />
> > >
> > > This would also check the existance of a variable, but it will assign it
> > a
> > > default value as well.
> > >
> > > Now I am sure cyba_sha1 is a MD5 hashing encryption so you might look at
> > the
> > > function has on coldfusion.
> > >
> > > Not sure what this does
> > > A = array(1732584193, 4023233417, 2562383102,  271733878, 3285377520);
> > > list(a,b,c,d,e)=A; so can't answer you there.
> > >
> > > and strpad you might go to udf.com I think it is  for string
> > manipulation
> > > code.
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259858
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to