|
Posted by Robizzle on 10/07/05 21:44
I am having problems appending a number to the end of a string. I
searched google and google forums and couldn't figure it out .... sorry
i'm sure its simple.
so I have:
$filename = 'test.file.";
$i = 0;
and I want to change $filename to become 'test.file.0'.
$filename .= $i; //doesn't work
$filename += $i; //doesn't work
$filename .= (string) $i; //doesn't work, nor does += (string) $i
So, how could I do this using these variables?
(I plan to do this inside a loop, and loop until test.file.i does not
exist, at which point I will create one and save the news post. I will
do the same to display the news on my front page -- loop through
starting at i=0 and display the contents of the files until test.file.i
does not exist)
Cheers,
-Rob
Navigation:
[Reply to this message]
|