|
-
Mar 25th, 2003, 10:46 AM
#1
Thread Starter
Fanatic Member
PHP - Need help URGENTLY
Hi all. I know i'm posting this in Chit-Chat... but nobody ever seems to go into PHP section. 
Dead simple this, but my brains fried!
I have a variable called " $file " without quotes obviously...
It contains this...
"file1.txt","file2.txt","file3.txt",
Which is fine... but notice the trailing "," and the end!!! It causes by Java to screw up and fall over.
HOW CAN I REMOVE THE END "," FROM THE LINE??? IN PHP???
Regards,
Paul.
-
Mar 25th, 2003, 10:50 AM
#2
Retired VBF Adm1nistrator
Just put a little more smarts into your string tokenizer on the java side of things ?
But I'll have a looksee...
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Mar 25th, 2003, 10:51 AM
#3
Retired VBF Adm1nistrator
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Mar 25th, 2003, 10:52 AM
#4
-
Mar 25th, 2003, 11:09 AM
#5
Thread Starter
Fanatic Member
Well...
I don't believe out of all those commands... i can't find one that works.
How difficult can it be to take off a "," from the end of a line!!! ???!!!???
Here is what $file contains:
"file.txt","file2.txt","file3.txt","file4.txt",
I need:
"file.txt","file2.txt","file3.txt","file4.txt"
Anyone got any quick code idea's? Cause i'm all out of them...
Regards,
Paul.
-
Mar 25th, 2003, 11:16 AM
#6
Code:
$rest = substr("abcdef", 0, -1); // returns "abcde"
-
Mar 25th, 2003, 01:57 PM
#7
Thread Starter
Fanatic Member
Originally posted by DeadEyes
Code:
$rest = substr("abcdef", 0, -1); // returns "abcde"
Nice one DeadEyes...
It works perfectly...
Take a look...
www.e-visionit.co.uk/preload.php
It's still being modified... but the PHP works perfectly!
Regards,
Paul.
P.S We know the shop is down...
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
|