Code: Select all
<?php
// ...other code to get results from DB...
$i = 1;
while($array2 = mysql_fetch_assoc($result)) {
$me{$i} = $array2ї'me'];
$myself{$i} = $array2ї'myself'];
isset($array2ї'andI']) ? $andI{$i} = $array2ї'andI'] : $andI{$i} = NULL;
$i++;
}
echo $me1;
echo $myself1;
echo isset($andI1) ? $andI1 : "";
?>I've found that if I make the variable variables static (e.g. $me1 instead of $me{$i}), I get what I'm expecting.