MemoryRefresh!

String



Questions Answers 0%

Pages   0 from 51
Questions   0 from 84

Reset



Concatenation operator
<?php $a = "a"; $b = "b"; echo $a . $b; // ab // concatenation of its right and left arguments Concatenating assignment operator Unlike many other languages (+ in Java), PHP has a special operation that can be used to concatenate two strings together.
<?php $a = "a"; $b = "b"; echo $a .= $b; // ab // appends the argument on the right side to the argument on the left side It is important to remember that this is the only way. Using the addition operator (like in Java) will result in the two strings being first converted to numeric values, and then added together.
<?php $a = "a"; $b = "b"; echo $a += $b; // 0
Questions

Related pages

Aritmetic !
String !
Comparison !
Logical !
Bitwise !


0% 100%
 
 
0 pages 51 pages
1) What's the output? <?php echo "a" . "b";




2) What's the output? <?php $a = "a"; echo $a .= "b";




3) What's the output? <?php $a = "a"; $b = "b"; echo $a += $b;




Last Review: n/a   Passed: n/a   Reviews: n/a   Next Review: n/a  


Concatenation operator
<?php $a = "a"; $b = "b"; echo $a . $b; // ab // concatenation of its right and left arguments Concatenating assignment operator Unlike many other languages (+ in Java), PHP has a special operation that can be used to concatenate two strings together.
<?php $a = "a"; $b = "b"; echo $a .= $b; // ab // appends the argument on the right side to the argument on the left side It is important to remember that this is the only way. Using the addition operator (like in Java) will result in the two strings being first converted to numeric values, and then added together.
<?php $a = "a"; $b = "b"; echo $a += $b; // 0



More from Php

Basics
Variables
Operators
Function
Array
String
Streams
Uncategorized


More from Programming

Php
jQuery




Powered by minte9.com