this is my code:
Code: Select all
<?php
function ImplodeProper($value, $lastConnector = 'and')
{
if( !is_array($value) or count($value) == 0) return '';
$last = array_pop($value);
if(count($value))
return implode(', ',$value).", $lastConnector $last";
else
return $last;
}
foreach ($P1_languages as $value)
echo ImplodeProper(array($value['language'])) ;
?>rather than english, chinese, and french
how can i do this?
is it right to use implode?
thanks in advance.