$array = array('item1', 'item2', 'item3', 'item4', 'item5');
here i want to extract only the first three items in the array, and then
$implodes = implode(';', $array);
echo $implodes;
which should output
item1;item2;item3
$i=0;
$new = array();
foreach($array as $arr)
{
$i++;
if($i <= 3)
{
$new[] = $arr;
}
}
doesn't look pretty tho