[Development Guides Home](/guides) >> [Guide to the LiveAPI System](/guides/guide-to-the-liveapi-system) >> [LiveAPI Methods](/guides/guide-to-the-liveapi-system/guide-to-the-liveapi-system-liveapi-methods)

# Guide to the LiveAPI System - The cpanelprint() Method

The `cpanelprint()` method returns a cPanel variable's value.

div
Warning:

* We **deprecated** this method. We recommend that you use the UAPI [`Variables::get_server_information`](/specifications/cpanel.openapi/cpanel-server-information/variables-get_server_information), [`Variables::get_session_information`](/openapi/cpanel/operation/get_session_information), and [`Variables::get_user_information`](/specifications/cpanel.openapi/account-information/variables-get_user_information) functions.
* Despite its name, this method does **not** print a value.


To return a hash reference of a cPanel variable's value, use the [`fetch()`](/guides/guide-to-the-liveapi-system/guide-to-the-liveapi-system-liveapi-methods/guide-to-the-liveapi-system-the-fetch-method/) method.

## Example

### LiveAPI PHP Class


```php
// Retrieve the cPanel account's username.
$cpanel->cpanelprint('$user');
```

### LiveAPI Perl Module


```perl
# Retrieve the cPanel account's username.
$cpliveapi->cpanelprint('$user');
```

## Parameters

| Parameter | Type | Description | Possible values | Example |
|  --- | --- | --- | --- | --- |
| `variable` | *string* | A cPanel variable. | A valid cPanel variable. Surround this variable with single quotes (`''`). For a full list of cPanel variables, read our [Guide to cPanel Variables](/guides/guide-to-cpanel-variables/).  The single quotes in this example are **required**. The method does **not** interpolate them. Instead, it passes those quotes to cPanel's `print` function, which requires them in order to return the correct value. | `'$user'` |


## Returns

This method returns the cPanel variable's value as a string.