[QUOTE=FireW0lf]
Sorry, but I did nest everything nicely, but the php pulled the spaces out
[/QUOTE]
In such cases try using the HTML tag, like this…
[HTML]myLen = length(myString)
myExtension = myString.char[myLen-4..t]
if myExtension = “.txt” then
’ Firstly, remove the “.txt” - we dont need it any more
myString=myString.char[1..myLen-4]
’ And loop through the remaining string character by character
myLen = length(myString)
repeat while myLen > 0
repeat with myLoop = 1 to myLen
’ Check for ""
if myString.char[myLoop] = "" then
’ Discard everything before it
myString=myString.char[myLoop+1..myLen]
end if
' Check for "_"
if myString.char[myLoop] = "_" then
' Use an array to hold the variables, as we dont know how many there will be
myArrayCounter = myArrayCounter + 1
' Store the text preceding the "_"
myVar[myArrayCounter] = myString.char[1..myLoop-1]
' And discard it and the "_"
myString = myString.char[myLoop+1..myLen]
end if
end repeat
end repeat
myLen = length(myString)
end if[/HTML]
…or the PHP tag…
[PHP]myLen = length(myString)
myExtension = myString.char[myLen-4..t]
if myExtension = “.txt” then
’ Firstly, remove the “.txt” - we dont need it any more
myString=myString.char[1..myLen-4]
’ And loop through the remaining string character by character
myLen = length(myString)
repeat while myLen > 0
repeat with myLoop = 1 to myLen
’ Check for ""
if myString.char[myLoop] = "" then
’ Discard everything before it
myString=myString.char[myLoop+1..myLen]
end if
' Check for "_"
if myString.char[myLoop] = "_" then
' Use an array to hold the variables, as we dont know how many there will be
myArrayCounter = myArrayCounter + 1
' Store the text preceding the "_"
myVar[myArrayCounter] = myString.char[1..myLoop-1]
' And discard it and the "_"
myString = myString.char[myLoop+1..myLen]
end if
end repeat
end repeat
myLen = length(myString)
end if[/PHP]
See ? you get the colors right too 