I want to display the password for the following image on the confirmation screen when moving from the registration screen to the confirmation screen in PHP.
] (14f8e40fc062edf5aa281c22f18eb04b.png)

What functions can be used to make the above image look like the first and last unexpectedly if I want to make it a hidden character?

Although I'm thinking about using a custom function
What should I think about?

  • Answer # 1

    It looks like this
    Part of the code is masked with an asterisk, so fill it in appropriately (10 places in total)

    fu ** tion mask_part_of_string ($str) *
        * etu * n $str [*]. "●●●●●●" * $str [st * len ($str)-*] *

    I think you know, but when you mask it, you can say "replace all characters except the first and last part of the password with ●".
    Isn't it bad if you don't know the number of characters in your password?

  • Answer # 2

    Isn't it just an image,?
    I think that it will come out if "maru" is converted with IME.