Is it possible to combine two variables to a new ?
eks.
$query = mysql_query("SELECT user_id, seat_id FROM table ORDER BY seat_id ASC");
while($row = mysql_fetch_array($query)) {
$user_id = $row["user_id"];
$seat_id = $row["seat_id"];
if ($seat_id) {
$seat_clr+$seat_id = "#FF0000";
$seat_info+$seat_id = "$user_id";
}
if (!$seat_id) {
$seat_clr+$seat_id = "#008000";
$seat_info+$seat_id = "0";
}
}
What I'm trying to do here is create a new variable that should go something like this:
$id = 23;
$string+$id should then become a new var called $string23
Is this possible ?
It's for table reservation and I have given each table a preset seat id.
So if for example seat 23 was taken ( it has a user assigned to it ), then it will set $seat_clr23 = "#FF0000";
Hope someone is able to help me.
Thanks
Brian Schmidt