I wrote this in PHP:
<?php
function glueString($str1, $str2) {
$tempstr = $str1 + $str2;
return $tempstr;
}
$s1 = 'this is a line.';
$s2 = 'this is another line.';
echo $s1.'<br/>'.$s2.'<br/>'.glueString($s1, $s2);
?>
I got this error:
Warning: A non-numeric value encountered in C:\xampp\htdocs\myProject\test.php on line 4
Warning: A non-numeric value encountered in C:\xampp\htdocs\myProject\test.php on line 4
this is a line.
this is another line.
0
'.$s2.` you concatenate using `.`, not `+` – brombeer Jan 12 '20 at 15:50