In this tutorial we will discuss, how to add(concat) two string variables in laravel.
Concat two string variables in laravel
We simply add(concat) two string type variables by add dot between variables see in example.
Example controller
<?php public function index(){ $firstName = "Anmol"; $lastName = "Sharma"; $fullName = $firstName.' '.$lastName; echo $fullName; }
You read this tutorial on advanced web tuts provided by anmol sharma.