Ruby: create a String from bytes

I would like to build a string from a byte value.

I currently use:

str = ” ”
str[0] = byte
This seems to work fine but I find it ugly and not very scalable to strings longer than 1 character.

Any …

String to array of Integers php

I wan to convert a string for example 1,2,3,4,5,6 to an array of integers in php?
I find functions that only have access to the first character of the string for example 1.
How can I conert the whole …