echo "This is your number $yournumber";
echo "This is your number $array['yournumber']";
The first line, an example of variable interpolation, will always work if $yournumber exists. The second line is simply a parse error. You should write:
echo "This is your number {$array['yournumber']}";
or
echo "This is your number $array[yournumber]";
But not
echo "This is your number {$array[yournumber]}";
Since then $array[yournumber] is referenced, where yournumber is some constant.
As for:
echo "This is your number ".$yournumber;
echo "This is your number ".$array['yournumber'];
This is just string concatenation, and both always work, assuming the variables exist.
I suggest you read the PHP Manual on arrays.
Is the second form a better coding style in general?
As a coding style, it is a matter of taste. The latter (concatenation) is marginally faster than the former (variable interpolation).