20 07, 2009

array_push

By | 2009-10-15T22:41:12+00:00 July 20th, 2009|Categories: PHP, Ruby|Tags: , , |Comments Off on array_push

The array_push() function pushes elements onto the end of an array (acting in the opposite way to array_pop).

PHP

$programming = array('java', 'ruby', 'python', 'php');
array_push($programming, 'asp');
print_r($programming);
=> /* 
Array
(
    [0] => java
    [1] => ruby
    [2] => python
    [3] => php
    [4] => asp
)
*/

Ruby

programming = ['java', 'ruby', 'python', 'php'];
programming.push('asp');
=> # ["java", "ruby", "python", "php", "asp"]
17 07, 2009

array_pop

By | 2009-10-15T22:41:20+00:00 July 17th, 2009|Categories: PHP, Ruby|Tags: , , , |Comments Off on array_pop

The array_pop() function removes the element off the end of an array and returns it’s value.

PHP

$my_array = array('java', 'ruby', 'python', 'php');
echo array_pop($my_array);
=> // php

Ruby

my_array = ['java', 'ruby', 'python', 'php'];
puts my_array.pop
=> # php

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.