I have a view with fields, where $row->type is a node type. When trying

<?php
print variable_get('comment_default_per_page'.$row->type);
?>

getting nothing

What is the correct way of using variable_get() to extract variables? Other function?

Comments

I was a little stuck on this too for a while, but try this in the field value code:

<?php
return variable_get('my_variable' , NULL);
?>

(Without the PHP tags)

And then this for the output code:
<?php
print $value
?>

That worked for me.