I've got array list:
$myarray = array(
array(
'name' => 'File name 1 - type.zip',
'size' => '600KB',
),
array(
'name' => 'File name 2 - type.pdf',
'size' => '1.5MB',
),
array(
'name' => 'File name 3 - type.jpeg',
'size' => '50.5KB',
),
);
. . . and need to truncate the file names, but keep extensions and size of files.
So for example 'File name 1 - type.zip'
should be displayed as 'File name 1 - ... .zip (600KB)'
.
Any tips?