Using this solution. I am trying to format a number with leading zero's. The length is 12 digits. The starting is 00000000001 and if the number is 10 then 000000000010 and so on. I have tried below
OGP-<?php $model=$dataProvider->getModels()[0];
str_pad($model['OGP_Serial_No'], 12, '0', STR_PAD_LEFT)?>
But it's giving me empty result OGP-.
How can I achieve this?
Any help would be highly appreciated.