Home Blog Page 389

Add static host name mappings to a Cisco router

Adding static host name to IP address mappings in a router (like a UNIX /etc/hosts file) can make life easier. These can override DNS entries for the host when needed, and can make easy references to other systems or devices that are not appropriate for DNS entries.

Word 2003: Translate Text to Different Languages

0

Word 2003 now includes the ability to easily translate text to different languages.

PHP syntax: sort an associative array by value with asort

To sort an associative array by the array values, use asort.

PHP syntax: sort an associative array by index keys

To sort an associative array by index values (or keys), use ksort.

PHP syntax: create an associative array

An associative array can use non-numeric index values and are useful because they can be iterated over sequentially and values can be extracted individually by index. Database select results can be returned as associative arrays in which the column names become indicies.

Rewrite domain.com to www.domain.com using htaccess in Apache

You may want all visitors to your site using www in front of your domain name (www.yourdomain.com) instead of just your domain name (yourdomain.com). By implementing a simple .htaccess RewriteRule, visitors to yourdomain.com will see the URL change in their browser as they are redirected to the correct URL.

PHP comparison syntax: equality

The equality comparison is a fundamental operation in programming languages. In PHP, to evaluate if one expression is equal to another, use the == comparison as described in this Tech-Recipe.