Actually, you can use it directly, as the 'echo' and the assignment show. Where you can't use it is embedded in a double-quoted string. In your print() example, you could just drop the quotes, but I'm guessing in real life you actually had a more complicated string example, in which case you need to concatenate it, same as you would with a string-returning function call, e.g.:
$a = "This is something of a 2-dimensioned array: " . $problem[0][0];