i have following problem:
i look for a variable to work with that comes from a fetch_object. the table has a standard value that will be changed by a if clause. in the further code i need to handle two status properties so that i need to know how can i get one or more variables from a switch clause?
i need something like:
$row = $query->fetch_object();
$Status = $row->Status;
$1 = switch($Status){case "1"};
$2 = switch($Status){case "2"};
or is there another way to realize that? it seems like switch is the onliest way to catch the status, isn’t it? thanks alot.
could this help you?
modified code: