php concat
$a = "hello";
$b = "world";
$c = $a . " " . $b;
echo $c; // hello world
변수와 텍스트를 문자열 php 로 결합하는 방법
<?php
$number = 8;
$txt = "the number is".$number.", ok?"; //Use a dot to combine
echo $txt;
?>
php 에서 두 문자열을 추가하는 방법
Remember dot .
변수 php 에 더 많은 데이터 추가
$a = "Hello ";
$a .= "World!";
php 는 변수를 함수에 연결합니다
public function getAvg(string $var) {
# A sample from a game I wrote.
# Concatenatin on the other side is just {stuff.$var}
# You can also concatenate multiple variables in a varaible:
# {$varA.$varb}
$min = $this->{$var._min};
# Assigns to $min object property matching $var + '_min' string.
$max = $this->{$var._max};
# Assigns to $max object property matching $var + '_max' string.
$avg = (($min + $max) / 2);
return round($avg);
}