23 04, 2009

printf

By | 2009-04-24T13:35:51+00:00 April 23rd, 2009|Categories: PHP, Ruby|Tags: , , , |1 Comment

Output a formatted string.

PHP

$format = 'There are %d monkeys in the %s';
printf($format, 5, 'tree');
// => There are 5 monkeys in the tree

Ruby

my_string = 'There are %d monkeys in the %s';
printf(my_string, 5, 'tree');
# => There are 5 monkeys in the tree
20 04, 2009

print

By | 2009-04-24T13:18:06+00:00 April 20th, 2009|Categories: PHP, Ruby|Tags: , , |Comments Off on print

Output a string.

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

PHP

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

Ruby

print 'Hello World!'
# => Hello World!
17 04, 2009

echo

By | 2009-04-24T13:13:16+00:00 April 17th, 2009|Categories: PHP, Ruby|Tags: , , |2 Comments

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!

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.