I see a function in PHP : array_pad()
I never use it.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It can be used when an array is required to contain a minimum number of elements, but one is not certain that there are enough, e.g. the top 10 high scores on a game that has only had 5 people play thus far.