Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Php array conversion, the number prefix is 0, how to deal with it, please give some advice, but don't point fingers, hehe.
Php array conversion, the number prefix is 0, how to deal with it, please give some advice, but don't point fingers, hehe.
You can use the php built-in function str_pad () to fill the string with the new length.

Str_pad (string, length, padding string, padding type)

parameter

String // required. Specifies the string to fill.

Length//required. Specify a new string length. If the value is less than the original length of the string, nothing is done.

Pad_string // optional. Specifies the string used for padding. The default value is empty.

Pad_type // optional. Specifies which side of the string to fill.

Please refer to: /article/8395.html for detailed usage.