Simple and newbie question about spacing, how to make spacing before $tag ?
$key[rand(0, count($ey)-1)] . $tag
Thanks for your help.
Simple and newbie question about spacing, how to make spacing before $tag ?
$key[rand(0, count($ey)-1)] . $tag
Thanks for your help.
You can simply add a space and concatenate the rest:
$key[rand(0, count($ey)-1)] . ' ' . $tag
You can add the space and concatenate the tag. Like said in the previous answer.
$key[rand(0, count($ey) - 1)] . ' ' . $tag;
You can also use double quotes like this. In $x
will be stored the same value as in the example before. This is useful when you want to add many variables together.
$myKeyValue = $key[rand(0, count($ey) - 1)];
$x = "$myKeyValue $tag";
And the space there is not trimmed, so you can make the space longer if you want.
$key[rand(0, count($ey) - 1)] . ' ' . $tag;