+ 1
PHP echo print question
Can somebody explain me why echo print(1) gives 11?
4 Respuestas
+ 3
Simple
if echo 1; outputs 1
and print 1; outputs 1
then echo print 1 outputs 11 (1 twice)
+ 2
I understand this is because each have their own place and situations where they are useful
check this link for more
https://stackoverflow.com/questions/234241/how-are-echo-and-print-different-in-php
0
@Infant Raj thanks, it was just a bit confusing because of one printing command inside another...
0
now it is clear :) thanks @Raj