Senior Member
How could i format this
This is the way it is for 300 plus in a simple text file one line after the other:
one@yahoo.com one_name
two@yahoo.com two names
I want to change them all around and insert the '||||'s so it's formated to accept and import into this wordpress plugin for adding members.
one_name||||one@yahoo.com|
two||||one@yahoo.com|
Some on the list have two names eg John Black i just want it trimmed to the first names only 'John' bit only.
this is an old list i'm importing in from somewhere else.
FK'n_dog
can you make use of this method ?
PHP Code:
arr = [];
lv = new LoadVars ();
lv . load ( "names.txt" );
/* - in names.txt -
one@yahoo.com Jack
two@yahoo.com John Black
three@yahoo.com Jane White
four@yahoo.com Jerry
*/
lv . onLoad = function(){
str = unescape ( this ). split ( "=&onLoad=[type Function]" ). join ( "" );
arr = str . split ( "\r\n" );
for(var n = 0 ; n != arr . length ; n ++){
arr [ n ] = arr [ n ]. split ( " " );
trace ( arr [ n ][ 1 ]+ "||||" + arr [ n ][ 0 ]+ "|" );
// copy the trace output to a new text file
}
};
/* - output =
Jack||||one@yahoo.com|
John||||two@yahoo.com|
Jane||||three@yahoo.com|
Jerry||||four@yahoo.com|
*/
i need it in actionscript2.0
I need function to format number in action script2.0 not in Php
FK'n_dog
Senior Member
Nice one Modified dog can i output that in a basic html page or something. I just don't have flash at the moment!
Senior Member
Or could you make me a swf i could put in html? Please.. Please sorry i would not normally ask this!
FK'n_dog
Flash 8 file and html attached.
requires names.txt to work correctly.
Attached Files
Senior Member
Bit of a late reply... i finally got this sorted out. Thanks for going to all the trouble of make an attachment swf file etc. It saved a lot of time and made it a lot more easier!!
Tags for this Thread
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width