I have a value like this
building_id as MN, HS, FB
floor no as 1,2,3,4 etc,.
room no as 1,2,3,4, etc,.
reg_id as 0001,0002,0003 etc,.
What I need is
I want to generate bench no using these three values like
(BUILDING_ID + FLOOR_NO + ROOM_NO + REG_ID) as MN01020001, MN01020002
I have tried the following query but not working
<?php echo $building_id.str_pad($floor_no, 2, STR_PAD_LEFT, '0').str_pad($room_no, 2, STR_PAD_LEFT, '0').''.str_pad($reg_id, 4, STR_PAD_LEFT, '0'); ?>
It is giving the output like this