Hi, I was wonder if there is anyway to concatenate a variable and a string to make a new variable name. For example, I have several variables:
$question1
$question2
$question3
To save code I want to do something like (I know that this doesn't work)
for ($i = 1; $i < 4; $i++) {
$row = $db->fetch_object($result); // some data from database
$question . $i = $row->description; // so loop $question1
// $question2, etc
}
Does anyone know how to go about this?
Thanks,
Kathleen