echo

  • Outputting a string in Ruby is done with the print method. Whereas echo is a language construct in PHP, Kernel#print is an actual method in Ruby. See print for more information on outputting strings.

    PHP

    echo "Hello World";
    // => Hello World

    Ruby

    print "Hello World"
    # => Hello World

    see also

each end

Looking for Rails or PHP web application development, integration, and training?

Rails for PHP is brought to you by Maintainable Software. Get custom web applications and personalized training from the authors of the book and website.