I want to create two separate functions in php and in javascript when I fetch my primary key and I pass it to my php function it adds eight time 0
when value of primary key came up to 10 then 0
numbers should be seven and when it came to 100
then 0
should be six before my primary key of mysql and same separate function in javascript.
When I pass it my primary key the same functionality should work in also javascript I try to find at google but there is not any example for it.
I know there is an option in mysql called zero filling but I want to do that with php and javascript.