> For the complete documentation index, see [llms.txt](https://jls-organization-3.gitbook.io/projecthyper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jls-organization-3.gitbook.io/projecthyper/features/quickstart/find.md).

# find

Get or retrieve array of datas.

**Usage:**

```php
$db->{table}->find();
$db->{table}->find($where);
```

**Example:**

```php
$news = $db->news->find();
echo json_encode($news);
```

**Return:**

```json
[
    {
        "id": "1",
        "name": "Test News",
        "status": "ACTIVE",
        "created_at": "2024-11-03 21:07:37",
        "updated_at": null,
        "deleted_at": null
    },
    ...
]
```

You can also pass options in the function:

Using Primary ID

<pre class="language-php"><code class="lang-php"><strong>$news = $db->news->find(1);
</strong>// [{
//     "id": "1",
//     "name": "Test News",
//     "status": "ACTIVE",
//     "created_at": "2024-11-03 21:07:37",
//     "updated_at": null,
//     "deleted_at": null
// }]

// If not existing
$news = $db->news->find(0);
// []
</code></pre>

Using other columns for retrieval

```php
$news = $db->news->find(
    array(
        'name' => 'Test News'
    )
);
// [{
//     "id": "1",
//     "name": "Test News",
//     "status": "ACTIVE",
//     "created_at": "2024-11-03 21:07:37",
//     "updated_at": null,
//     "deleted_at": null
// }]
```

Looking for the other parameters?

{% content-ref url="/pages/GBigEuwxBTtPN353H08f" %}
[Parameters](/projecthyper/features/quickstart/parameters.md)
{% endcontent-ref %}
