My Latest Code

I Right Code

I Right Code
I Write Code
I Write Better PHP Code

The greatest asset to any programmer is their ability to improve on the efficiency and simplicity of the code they write.

a) PHP Documentation
b) My PHP Code on GitHub

Code is an artistic expression and extension of one’s true self. There is nothing more satisfying then writing efficient and simplistic code that you know other programmers will view as good code. Practically anybody on God’s ...

Read more →

PHP Foreach – Query Users Tweets on Twitter

Queries twitter using specific keyword and posts most recent 100 tweets

Foreach Definition

The foreach construct provides an easy way to iterate over arrays. foreach works only on arrays and objects, and will issue an error when you try to use it on a variable with a different data type or an uninitialized variable. There are two syntaxes:

foreach (array_expression as $value)
foreach (array_expression as $key => $value)

The first form loops over the array ...

Read more →

PHP – Most Frequent Element in an Array

A program that finds the most frequent element in an array.

Program Uses PHP functions:
array_count_values, arsort, array_keys,



array_count_values() returns an array using the values of array as keys and their frequency in array as values.


arsort — Sort an array in reverse order and maintain index association
This function sorts an array such that array indices maintain their correlation with the array elements they are associated with.

This is used mainly when sorting associative arrays where the actual element order is significant.


array_keys ...

Read more →
Page 2 of 3 123