Text Size
Sunday, May 20, 2012
Get a look down
Joomla >> Items filtered by date: January 2012
Items filtered by date: January 2012
Here's how you can get the first N elements of an array, it's so simple with the use of array_slice :
1
2
3
4
5
6
7
8
9
10
<?php
// Array
$myArray = array("bird", "dog", "cat", "horse", "lizard");
 
// Get the 2 first elements
$output = array_slice($myArray, 0, 2);
 
// Result
// This will give an array with elements : "bird", "dog"
?>
Published in Code snippets
Tuesday, 17 January 2012 11:42

How to keep putty connection alive

Users of Windows environments often use the PuTTY client for their connections with Linux, it allows them to have direct access to the SSH server to perform bash command line.

Such access facilitates surely the task for network administrators, developers or even the webmasters.A command line that runs in a few seconds often avoids long working hours.

Published in General
Sunday, 08 January 2012 21:47

Passing variables to custom module template

Among the best practices in developing a Drupal module, the use of templates is placed high on the list, this allows us to respect the MVC pattern (or at least a small part of it).

Published in Drupal
Usefull tricks