Basically I need to create this array (given x = 3)
array('?','?','?');
I could do
for ($i = 0; $i < 3; $i++)
$arr[] = '?';
But it's not so elegant. Is there any other way?
Use array_fill( start_index, num, value ):
$arr = array_fill(0, 3, '?');