0

I installed komodo IDE 8.5 to write and test php codes. The first program I tried to test was this:

<?php   // test_1.php
     $username = "fred Smith";
     echo $username;
     echo "<br>";
     $current_user = $username;
     echo $current_user;

?>

when I run the program in Firefox it works as it should and prints fred smith 2 times in 2 seprate lines. but when I run it on komodo, the output is a

fred Smith<br>fred Smith

whats wrong whit program or IDE?

Sam
  • 485
  • 2
  • 8
  • 17
  • Change the `echo
    ` with `echo 'cli' === PHP_SAPI ? "\n" : '
    ';`
    – php-dev Nov 23 '14 at 09:08
  • 2
    You never 'run the program in Firefox': it's always executed on server, and, as it stands, it always outputs the same string. But while IDE shows this output as is, Firefox treats the server's output as HTML file, hence `
    ` becomes a new line separator.
    – raina77ow Nov 23 '14 at 09:14

0 Answers0