Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 8947

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>String Operators</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="language.operators.logical.html">Logical Operators</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="language.operators.array.html">Array Operators</a></div>
 <div class="up"><a href="language.operators.html">Operators</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="language.operators.string" class="sect1">
   <h2 class="title">String Operators</h2>
   <p class="simpara">
    There are two <span class="type"><a href="language.types.string.html" class="type string">string</a></span> operators. The first is the
    concatenation operator (&#039;.&#039;), which returns the concatenation of its
    right and left arguments. The second is the concatenating assignment
    operator (&#039;<em>.=</em>&#039;), which appends the argument on the right side to
    the argument on the left side. Please read <a href="language.operators.assignment.html" class="link">Assignment
    Operators</a> for more information.
   </p>

   <p class="para">
    <div class="informalexample">
     <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$a&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"Hello&nbsp;"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$b&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$a&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"World!"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;now&nbsp;$b&nbsp;contains&nbsp;"Hello&nbsp;World!"<br /><br /></span><span style="color: #0000BB">$a&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"Hello&nbsp;"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$a&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #DD0000">"World!"</span><span style="color: #007700">;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;now&nbsp;$a&nbsp;contains&nbsp;"Hello&nbsp;World!"<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
     </div>

    </div>
   </p>
   <p class="para">
    See also the manual sections on the
    <a href="language.types.string.html" class="link">String type</a> and
    <a href="ref.strings.html" class="link">String functions</a>.
   </p>
  </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="language.operators.logical.html">Logical Operators</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="language.operators.array.html">Array Operators</a></div>
 <div class="up"><a href="language.operators.html">Operators</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>