PHP mysqli help

From: Date: Thu, 11 Aug 2011 06:18:22 +0000
Subject: PHP mysqli help
Groups: php.general 
Request: Send a blank email to php-general+get-314485@lists.php.net to get a copy of this message
So I have: $result = $dbh->query ("select * from roles order by name"); $row = mysqli_fetch_object ($result); function process_field ($which) { // This fails, I need to know how to do this the right way if ($row->may_$which == 'Y') { // Print stuff } else { // Print other stuff } } There's a field "may_basic" in roles. I need to call process_field ("basic"). If I need to pass the string "may_basic" it will work also.

« previous php.general (#314485) next »