$a = "hello"; $b = "world"; $c = $a . " " . $b; echo $c; // hello world
$idArray = []; array_push($idArray,generateId($idArray));
function generateId($existingIds) { $currentDate = date('Ymd'); $id = 1; while (in_array($currentDate . sprintf('%02d', $id),$existingIds)) { $id++; } return $currentDate . sprintf('%02d', $id); }