$cg= $mysqli->query("SELECT * FROM news WHERE id='$postid'
and status='1' ORDER BY RAND()");
while($sd= $cg->fetch_assoc()){
$title= $sd['title'];
}
What i want to do is turn var $title to something like
$mytitle[1] = 'first title';
$mytitle[2] = 'second title';
$mytitle[3] = 'third title';
$randnews= rand(1, 3);
echo $mytitle[$randnews];