How to Add(Concat) two String Type Variables in Laravel

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.

php laravel developer anmol sharma

Anmol Sharma

I am a software engineer and have experience in web development technologies like php, Laravel, Codeigniter, javascript, jquery, bootstrap and I like to share my deep knowledge by these blogs.

Random tutorial links