I have the following array
:
$array = array(10,20,30);
print_r($array);
Output:
Array
(
[0] => 10
[1] => 20
[2] => 30
)
If I print with echo
before print_r
:
echo 'primeiro: ';
print_r($array);
Output:
primeiro: Array
(
[0] => 10
[1] => 20
[2] => 30
)
If I print concatenating, print_r
is printed before:
echo 'primeiro: ' . print_r($array);
Output:
Array
(
[0] => 10
[1] => 20
[2] => 30
)
primeiro: 1
Still, print this 1
in front of primeiro
.
Why does this happen? What is this 1
?