Getting hard time to fix this one, please help me :(
$string = "Question 1 , Question 2, Question 3"; // Value came from Database;
My code is
while($row = mysqli_fetch_assoc($result))
{ $alphas = range('A', 'C');
$output = str_replace(',', ('<br/>'.$alphas[$row]), $string);
echo $output
}
The Result will be like this:
Question 1
Question 2
Question 3
What I want is , every comma will change into different value
A. Question 1
B. Question 2
C. Question 3
Please help me guys! thank you