Where to place a wireless router inside the house

It seems that many people put their wireless router near their main phone line, or near a wall with a window, usually that is the location closer to the internet line coming from the street, and it is the most convenient, but it is not the best location for the wireless signal.

Placing the router on an edge of the house, closer to windows, make it much more susceptible to interference from neighbours wireless devices, while placing it in the middle of the house, make the cement walls act as a natural shield for wireless signals coming from farer locations.

It is also better to place the router about 2 meters of the ground, above most humans moving in the place.

It seems that the middle of the house, away from the windows is the best location, however routing cables for internet/power/ethernet seems to be a problem, if that is a problem for you too, try to find a middle ground.

If you have an experience with wireless router placement, please feel free to include it in comments.

Unset an array item in a foreach loop

Trying to remove an item from a PHP foreach loop is not a straight forward job, because, PHP works on a copy of that array, so you need to do it like this:

$items = array('a','b','c','d');
foreach ($items as $key => $value) {
    if ($value=='b' || $value=='d') {

this outputs:

array(2) {
  string(1) "a"
  string(1) "c"

Tools for debugging JavaScript in your browser

If you want to work on Javascript, you will find it very helpful to go through the code and set breakpoints and do more debugging stuff, fortunetly, there are tools in browsers to help with that.

Which tool you will user, depends on which browser you want to debug depends on your browser:

Firefox, you have 2 choices:

You can use built in developer tools, which can be accessed via the:
Menu > Developer > Debugger
and you can also right click on any element in your web page to inspect it.

Another option for firefox is FireBug, which is a very useful add-on, after installing it you will find it either on the top bar as an icon, or you can:
click “alt” > then the old menu will appear, and you will find firebug under
View > Firebug
you can also click anywhere in the webpage and select ‘Inspect Element with Firebug’


Menu > Tools > Developer tools
Menu > Tools > Javascript Console

Internet Explorer:

Just click ‘F12’
Tools > F12 Developer tools