# withFallback

Learn how to set a fallback for the content.

This method sets a fallback value returned when the content cannot be fetched.

Without a fallback, a failed request throws an [exception](/reference/sdk/php/api/exceptions/croct-exception).

## Signature

This method has the following signature:

```php
public function withFallback(mixed $content): self
```

This method returns a copy of the options with the change applied, leaving the original unchanged.

## Example

Here is a basic example of how to use this method:

```php
<?php
use Croct\Plug\FetchOptions;

$options = FetchOptions::defaults()->withFallback(['title' => 'Welcome']);
```

## Parameters

The following list describes the supported parameters:

- `content`: `mixed`

  The fallback value returned when the content cannot be fetched.
