echo

Output one or more strings.

Strictly speaking, echo() is not a function in PHP, it is a language construct.

PHP

echo 'Hello World!';
// => Hello World!

Ruby

print 'Hello World!'
# => Hello World!
By | 2009-04-24T13:13:16+00:00 April 17th, 2009|Categories: PHP, Ruby|Tags: , , |2 Comments

About the Author:

2 Comments

  1. Adit April 20, 2011 at 9:30 am

    I think “concat” is actually the real conversion for “echo”.

    Please consider the following:
    <div class=””>…

    The converted:
    <div class=””>…

    “puts” and “print” are -if i’m not wrong- for background usage (eg. terminal, logs, file, …)

  2. Adit April 20, 2011 at 9:35 am

    hey my comment went corrupted!

    I wanted to add in the two class fields:

    [in php]
    if($cond) echo ‘myclass’;

    [in ruby]
    concat ‘myclass’ if cond

Comments are closed.

This Is A Custom Widget

This Sliding Bar can be switched on or off in theme options, and can take any widget you throw at it or even fill it with your custom HTML Code. Its perfect for grabbing the attention of your viewers. Choose between 1, 2, 3 or 4 columns, set the background color, widget divider color, activate transparency, a top border or fully disable it on desktop and mobile.

This Is A Custom Widget

This Sliding Bar can be switched on or off in theme options, and can take any widget you throw at it or even fill it with your custom HTML Code. Its perfect for grabbing the attention of your viewers. Choose between 1, 2, 3 or 4 columns, set the background color, widget divider color, activate transparency, a top border or fully disable it on desktop and mobile.