I am running a php script from CLI command and web browser. I need to dispaly new lines properly in both ways so that it does not print "<br />" in CLI and it shows new lines in browsers. Does anyone know how to write php function for this?
thanks for any helps
You could write a function to return the right thing based on the execution environment: