hello i want to show multiple values from the database in the same line using <span>
like this: value1 - value2 - value3 and so on. Here is the code
public function Show_Advertisments($uid)
{
$query=mysqli_query($this->db,"SELECT a_title,a_desc,a_url,a_img, to_uid_fk FROM advertisments WHERE status='1' ORDER BY a_id DESC")or die(mysqli_error($this->db));
while($row=mysqli_fetch_array($query,MYSQLI_ASSOC))
{
$data[]=$row;
}
return $data;
}
<?php
$Advertisments=$Wall->Show_Advertisments();
if($Advertisments)
{?>
<?php foreach($Advertisments as $data)
{
?>
<h3><span><?php echo $data['a_title']; ?> - </span></h3>
<?php
}
}
?>