echo off code example

Example 1: php clear echo

<?php

ob_start();
echo 'a';
print 'b';

// some statement that removes all printed/echoed items
ob_end_clean();

echo 'c';

// the final output is equal to 'c', not 'abc'

?>

Example 2: bat turn echo off

The following can be used to turn echo off in a bat file at any point:
@echo off
It can be turned on again at any point with:
@echo on

Example 3: echo -n bash

echo(1) - display a line of text
Echo the STRING(s) to standard output.
-n    do not output the trailing newline

Tags:

Php Example