November PHP-Scripts Blog Archives

Is number odd or even?

Testing whether a number is odd or even in PHP. The custom function is_odd() below is inspired by an algorithms thread at Devshed. The function isn’t even necessary and could be expressed as a one-liner like this:

echo($number & 1); // $number = any integer, 0 = even, 1 = odd
 

Here’s the code to check […]

Setting up a new Wordpress blog

This guide assumes you have already downloaded and unzipped/untarred the most current Wordpress version. These instructions do not cover the multi-user WP version.
Steps for setting up a new Wordpress (WP) blog:
1. Database created? Create a MySQL database for the domain.
Note: If you have more than one WP blog installed in the same database then open […]

How to get the IP address on local Windows Machine

Step by step instructions:
1. Navigate to START - > RUN
2. Launch the command window by typing:
cmd
3. Type:
ipconfig /all
4. The IP address for the machine will show in the “Connection” section next to: IP Address.