-
PHP - Need help URGENTLY
Hi all. I know i'm posting this in Chit-Chat... but nobody ever seems to go into PHP section. :D
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.
-
Just put a little more smarts into your string tokenizer on the java side of things :confused: ?
But I'll have a looksee...
-
-
-
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.
-
Code:
$rest = substr("abcdef", 0, -1); // returns "abcde"
-
Quote:
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...