How to pad an array with the same value multiple times?



How to pad an array with the same value multiple times?..

Answer / Neeraj Kumar Singh

In PHP, you can pad an array with the same value multiple times using the array_pad() function. Here's an example: `$array = array_pad($array, count($array) + $num, $value);`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

Explain the purpose of output buffering in php.

1 Answers  


How send email using php?

1 Answers  


what is the current salary package in India for a PHP & MySQL programmer who has 3 years experience

127 Answers   ABC, BLG Logistics, Google, HCL, IBM, Infosys, People Group, PHP, Torque Infotech, V Angelz Technologies, Yahoo,


How to set cookies in PHP?

1 Answers  


Explain the ternary conditional operator in php?

1 Answers  


Does cors prevent csrf?

1 Answers  


What are the encryption functions available in PHP?

1 Answers  


Does exist in php?

1 Answers  


What is php mean?

1 Answers  


Explain me what is the importance of "method" attribute in a html form?

1 Answers  


how to uploade video in php????

1 Answers  


What are the types of variables in php?

1 Answers  


Categories