Hello, i know there is probably a really simple answer for this, but have been playing around for ages now and can't manage to find the answer!!
All i want is so that the last "$row[name]" to be displayed does not include the "<br>" afterwards so that i don't have a stupid blank line on by screen!
<?php
$sql = "SELECT FROM #### WHERE id = $_SESSION[id]";
$result = hesk_dbQuery($sql) or hesk_error("");
while ($myuser2=dbFetchAssoc($result))
{
$sql_category = "SELECT FROM ####";
$result_category = dbQuery($sql_category) or hesk_error("");
$cat=substr($myuser2['categories'], 0, -1);
$myuser2['categories']=explode(",",$cat);
$mycategories = $myuser2['categories'];
while ($row=dbFetchAssoc($result_category))
{
if (in_array ($row[id],$mycategories)) {
print $row[name];
print "<br>";
}
}
} // End while
?>