Suppose the array:
$prices = array (
'7.20',
'7.40',
'8.00',
'8.50',
'9.30',
'10.40',
'11.00',
'12.00',
'12.50',
'13.00',
)
Is there any clever, short (as close to an one-liner as possible) solution to copy each value to the next position, effectively doubling the array? So that the array above would become:
$prices = array (
'7.20',
'7.20',
'7.40',
'7.40',
'8.00',
'8.00',
'8.50',
'8.50',
'9.30',
'9.30',
'10.40',
'10.40',
'11.00',
'11.00',
'12.00',
'12.00',
'12.50',
'12.50',
'13.00',
'13.00',
)