Am having a foreach loop using php and separating the next item with / i would like the / to be removed in the last item
This is the code:
<?php
$contacts = TblContact::find()->orderBy("id")->all();
foreach ($contacts as $contact){
echo $contact->contact."/"; //... this has the separator /
}
?>
currently it generates:
2362/2332/3332/
I would like it to generate
2362/2332/3332 ... this has no trailing /