why when I print array
echo "Test. $arr1[0]"; // Output is Test Array[0].
For scalar variable $a = "test2"; echo "$a2"; //Output test2.
Why I cannot get variable from array?
TH
echo "Test". $arr1[0];
thorpe wrote:echo "Test". $arr1[0];
I know that.. However, Can I use quotes to print array values?
Yes, but you need to use braces as delimiters.
echo "Test {$arr[0]}";
You might as well simply concatenate, which will be (marginally) faster anyway.