Re: Adding strings together....
| From: | Kris Dahl | Date: | Thu, 03 Aug 2000 17:05:26 +0000 |
| Subject: | Re: Adding strings together.... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-9982@lists.php.net to get a copy of this message | ||
on 8/3/00 9:01 AM, Richard Edens at richard@bloom.nl wrote:
> Hi,
>
> With Richard Edens...
> I've read the tutorial about PHP but i can't find annything for
> the following simple problem...
>
> Adding strings together...
> In javascript for instance this might look like this:
>
> ----
> var text_alpha = "hallo ";
> var text_berta = "world...";
>
> text_alpha = text_alpha + textberta;
> ----
Try
$text_alpha .= $test_berta;
to append one string onto another
or
$test_alpha = $text_alpha . $text_berta;
in more general terms.
> ----
> text_alpha = text_alpha + textberta[0] + '\n';
> ----
$text_alpha .= $textberta[0] . "\n";
Just use . instead of +, essentially.
-k