©
This document uses PHP Chinese website manual Release
<?php
echo "hello" . "world" ;
?>
Function name: (null)
Compiled variables: none
line | # | op | fetch | ext | return | operands |
---|---|---|---|---|---|---|
6 | 0 | CONCAT | ~0 | 'hello','world' | ||
1 | ECHO | ~0 | ||||
7 | 2 | RETURN | 1 |
[#1] shadiadiph at yahoo dot com [2012-06-07 15:37:59]
Concat . is a very useful tool in php while creating long strings or creating a set of data for example;
<?php
// GIVE THE STRING A NAME
$mystring="";
// NOW USE CONCAT . TO BUILD THE STRING
$mystring.="hello,";
$mystring.="world";
echo $mystring;
?>
output will be
hello,world