Re: Appending an integer to a string
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Appending an integer to a string

From: Malcolm Dew-Jones <yf110@vtn1.victoria.tc.ca>
Date: Fri Oct 07 2005 - 21:30:37 CEST

Robizzle (Rob.Meyer1@gmail.com) wrote:
: 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.";
                         ^

Mismatched quotes. It works for me when I use the correct quotes.

        $ php

        <?php

        $filename = 'test.file.'; # note quote
        $i=0;
        
        $filename .= $i;
        
        echo $filename;
        
        ?>
        ^D

        test.file.0

--
This programmer available for rent.
Received on Tue Oct 18 02:39:03 2005