Category: PHP

Past few months, I have seen a lot of people asking for sites that teach php from the ground up. So, here are a couple of places you can go…

PHP

This is modified and expanded version of http://net.tutsplus.com/articles/news/how-to-read-an-rss-feed-with-php-screencast. <?php function shorten($string, $length=65){ $truncated_string = ”; foreach (explode(‘ ‘, $string) as $word){ if (strlen($truncated_string) >= $length){ return $truncated_string; } $truncated_string .=…

PHP

This class can be used to get information of the country of an IP address. It takes an IP address and queries MySQL database to determine the country associated with…

PHP

MYSQL PHP

PHP

This is actually a neat trick. Here is the example: <?php if (isset($username[5])) { // The username is at least six characters long. } ?> When you treat strings as…

PHP

This tip accidentally stumbles upon a useful practice, which is to always initialize variables before you use them. Consider a conditional statement that determines whether a user is an administrator…

PHP

PHP

PHP

PHP Web Security