How can I change an integer to a string?

Here’s an example:

int $counter = 1;
string $bob = "bob";
string $number = $counter;