how to add two string in php code example
Example 1: how to add two string in php
Remember dot .
Example 2: add more data to variable php
$a = "Hello ";
$a .= "World!";
Example 3: how to increment a number after concatinating it with a date function in php
function generateId($existingIds) {
$currentDate = date('Ymd');
$id = 1;
while (in_array($currentDate . sprintf('%02d', $id),$existingIds)) {
$id++;
}
return $currentDate . sprintf('%02d', $id);
}