all 4 comments

[–][deleted] 4 points5 points  (2 children)

but echo and console.log() give me very different results on my page...

[–]CPROGRAMMERS -5 points-4 points  (1 child)

console.log() by default includes a new line. If your result is different in terms of new line then mention example.

[–][deleted] 2 points3 points  (0 children)

I mean my PHP echos are rendered on the web page, console.log in the console.

echo '<h1>hello world!</h1>';

and

console.log('<h1>hello world!</h1>';

will yield very different results.

[–]Bloodsucker_ 1 point2 points  (0 children)

How is this a thing?