Working with a range

I have a php variable

$x = 38 - 42

Can I make it

[38,39,40,41,42}

This link maybe useful:

https://www.php.net/manual/en/function.range.php

3 Likes