/
string.xml
40 lines (37 loc) · 1.12 KB
/
string.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0" encoding="utf-8"?>
<sect1 xml:id="language.operators.string">
<title>String Operators</title>
<titleabbrev>String</titleabbrev>
<simpara>
There are two <type>string</type> operators. The first is the
concatenation operator ('.'), which returns the concatenation of its
right and left arguments. The second is the concatenating assignment
operator ('<literal>.=</literal>'), which appends the argument on the right side to
the argument on the left side. Please read <link
linkend="language.operators.assignment">Assignment
Operators</link> for more information.
</simpara>
<para>
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
$a = "Hello ";
$b = $a . "World!"; // now $b contains "Hello World!"
$a = "Hello ";
$a .= "World!"; // now $a contains "Hello World!"
?>
]]>
</programlisting>
</informalexample>
</para>
<sect2 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><link linkend="language.types.string">String type</link></member>
<member><link linkend="ref.strings">String functions</link></member>
</simplelist>
</para>
</sect2>
</sect1>