From the Code out of the comment you should try this,
<?php
echo "<li><a href='index.php?brand=" . $brand_id . "'>" . $brand_title . "</a></li>";
echo "<li><a href='index.php?cat=" . $cat_id . "'>" . $cat_title . "</a></li>";
?>
EDIT:
function getBrands(){
if(!isset($_GET['cat'])){
global $connect;
$get_brands = "select * from brands";
$run_brands = mysqli_query($connect, $get_brands);
while ($row_brands=mysqli_fetch_array($run_brands)){
$brand_id = $row_brands['brand_id'];
$brand_title = $row_brands['brand_title'];
echo "<li><a href='index.php?brand=" . $brand_id . "'>" . $brand_title . "</a></li>";
}
}
}
So if you get a categorie the getBrands function do nothing. remove the if statement.
function getBrands(){
global $connect;
$get_brands = "select * from brands";
$run_brands = mysqli_query($connect, $get_brands);
while ($row_brands=mysqli_fetch_array($run_brands)){
$brand_id = $row_brands['brand_id'];
$brand_title = $row_brands['brand_title'];
echo "<li><a href='index.php?brand=" . $brand_id . "'>" . $brand_title . "</a></li>";
}
}