Monthly Archives: April 2011

Link exchange? Do research before you put a link for someone.

What is Link Exchange In case you are not familiar with SEO, let me elaborate what “link exchange” is. Usually as a website owner, I would like to have more other websites (of good quality) link to my website so as to increase the exposure and page-rank of my website. If I think the websites […]

How to know a blog comment is actually a spam?

A surprise Zome off is a new and little popular blog that is even not showing on any search result by any keywords (except the word ‘zomeoff’ which nobody would be interested to look for it) in any search engine. So it’s really a big surprise that many people are trying to leave comment on […]

PHP – isset() vs array_key_exists() : a better way to determine array element’s existence

The story In the CourseYou project, we’re asked to check if an element is set in an array. That is,  we’re asked to determine whether $Arr[‘MyElement’] exists. So we use the following code as a start. <?php if (isset($Arr[‘MyElement’])) { … do my stuff … } ?> This code works fine, but, it works fine […]

Equal (==), identical (===) and array comparison in PHP

Equal (==) If you use equal (==), you are allowing type conversion which means PHP will try to convert the two sides into the same type and then do the comparison. So even if the two sides are NOT the same thing, they MAY still be treat as the SAME. Consider this code: <?php $left […]