Friday, April 15, 2011

for each in php

1. For each bring one value at a time

<?php

 $fruit
= array( "Banana","Apple", "Plum");

foreach (
$fruit as $fruit_name)
{
    echo 
"$fruit_name<br/>\n";
}
?>
 


The above will display:
Banana
Apple
Plum 
2. For each bring two value in the array


<?php

$fruitColours 
= array("Banana" => "Yellow","Apple"  => "Green","Plum"   => "Purple");

foreach (
$fruitColours as $fruit_name => $fruit_colour)
{
    echo 
"$fruit_name is $fruit_colour<br/>\n";
}
?>




The above will display:
Banana is Yellow
Apple is Green
Plum is Purple

Monday, December 20, 2010

Stop Firefox from Automatically Entering "Work Offline" Mode


The "Work Offline" mode in Firefox can be useful if you don't have an internet connection, but Firefox annoyingly enables it automatically whenever you lose connection, even for a second. Here's how to disable that behavior.

If you have a spotty connection and are sick of Firefox constantly throwing you into Work Offline mode, there's a new about:config tweak in Firefox 3.6 and above that will disable this annoying behavior. Type about:config in the address bar, right click anywhere, and hit New > Boolean. Type in network.manage-offline-status as the preference name and hit OK, setting it to false when prompted.


Now, Firefox should stop automatically toggling the Work Offline mode when your connection blips out. Of course, you can still use Work Offline mode, you just have to toggle it yourself in the preferences.

Thursday, December 2, 2010

How to know where your mobile made

All mobile phones are assigned a unique 15 digit IMEI code upon production. Click Here you can check all known information regarding manufacturer, model type, and country of approval of a handset.

LinkWithin

Related Posts Plugin for WordPress, Blogger...