# The PHP API

> The few functions that read, print, find and save your fields from your theme.

Source: https://uglydev.com/docs/php-api/
Updated: 20 November 2026

> **In this page:** you will be able to print, read, loop, write and search values, and know exactly when to escape.
> 
> **You need:** a group with a field, and a theme file you can edit.

```php
ugly_get( 'field' );             // the value, ready to use
ugly_show( 'field' );            // prints it, safe to print
ugly_rows( 'field' );            // the rows of a repeater or flexible content, to loop over
ugly_update( 'field', $value );  // saves it, cleaned like what an editor types
ugly_delete( 'field' );          // deletes it
ugly_find( 'recipe', [ ... ] );  // finds posts by their fields
```

```
[ugly-fields field="field"]       // the same as ugly_show(), inside content
```

## Where to go next

| You want to… | Read |
| --- | --- |
| Look up one function | [Reference: functions](https://uglydev.com/docs/functions/) |
| Copy a working recipe | [Cookbook](https://uglydev.com/recipes/) |
| Write safe, fast templates | [Best practices](https://uglydev.com/docs/best-practices/) |
| Understand the safety model | [Security](https://uglydev.com/docs/security/) |
