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.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to