# Please help me change the php code from pagination from + size to search\_after

**URL:** <https://discuss.elastic.co/t/please-help-me-change-the-php-code-from-pagination-from-size-to-search-after/360323>\
**Category:** Elasticsearch\
**Created:** [May 28, 2024, 1:14am UTC](https://discuss.elastic.co/t/please-help-me-change-the-php-code-from-pagination-from-size-to-search-after/360323 "2024-05-28T01:14:16Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 28, 2024, 9:37pm UTC](https://discuss.elastic.co/t/please-help-me-change-the-php-code-from-pagination-from-size-to-search-after/360323/4 "2024-05-28T21:37:19Z")

</div>

I don't really know PHP but I guess you need to mimic what the REST API is expecting. [Paginate search results | Elasticsearch Guide [8.13] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#search-after)

Could you try and may be share the code you wrote and the problem you are facing?

Please [read this](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) about how to format.

---

_[View the full topic](https://discuss.elastic.co/t/please-help-me-change-the-php-code-from-pagination-from-size-to-search-after/360323)._
