prepend a string in PHP

prepend a string in PHP

In this post we will give you information about prepend a string in PHP. Hear we will give you detail about prepend a string in PHPAnd how to use it also give you demo for it if it is necessary.

Use the PHP Concatenation Operator


There is no specific function to prepend a string in PHP. But you can use the PHP concatenation operator (.) to prepened a string with another string.


Let’s take a look at the following example to understand how it basically works:



<?php
$a = "Hello";
$b = "World!";
$b = $a . " " . $b;
echo $b; // Outputs: Hello World!
?>


I hope you like this small article.

Hope this and post will helped you for implement prepend a string in PHP. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and Keep reading our blogs

For More Info See :: laravel And github

Leave a Comment

Your email address will not be published. Required fields are marked *

47  +    =  54

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US