how to remove empty element from array
Monday, June 30th, 2008$cleaned_array = array_filter($countries);
by not supplying a callback function to array_filter function it skips the empty values
$cleaned_array = array_filter($countries);
by not supplying a callback function to array_filter function it skips the empty values
<?php
$data = array(
‘ ‘,
‘test’,
123,
);
// filtering non-empty elements.
$data = preg_grep(’#S#’, array_map(’trim’, $data));
var_dump($data);
/* Result
array(2) {
[1]=>
string(4) “test”
[2]=>
string(3) “123″
}
*/
?>
If you want to get listed for secondary keywords use them infrequently in the body of your post. The theory is that the more times a keyword appears within a Webpage, the more relevant the page is likely to be for someone searching those keywords.
But do not overdo this by repeating the same keywords over and over again. Google bots can find out if a keyword is too frequent on a page and might just remove your site from their index.
1 Searching in a Range
So, you are searching for Sexy Singles between the age of 18 and 25 or looking for a cake which weighs between 100 and 200 pounds? Google has a way which lets you specify the range you want to find results in.
The trick is to use “..”double dotsbetween the range. For example, Cake 100..200 pound or Sexy Singles 18..25 years.
I don’t really want to give the exact query I used to test this trickI am sure some of you are reading it from workbut don’t forget to specify the unit. Google is smart but not “THAT” smart.
2 Synonym Search
Want to search for the term and its synonyms at the same time? Google makes it easier for you than you having to search every synonym individually.
The easy way that Google offers is just to add the “~” sign in front of your search term and voila!
For example if you want to search for funny pictures and its synonyms then just search for ~funny ~pictures and Google will return the results for funny picture, funny image, stupid pictures, comic image etc. Get the idea?
3 Remove Some Words
If you want to omit certain words from the search results then you can simply add the “-” sign in front of your search term.
Lets say that you search for Clinton on Google, you will get results for Bill Clinton, Hillary Clinton and even Monika Lewinsky. But if you don’t want search results for Hillary, just add - Hillary and you will see results only for Bill Clinton and Monika Lewinsky.
4 Let Google Define It
You can add “define:” in front of a word and Google will find its definitions from around the Internet. Just try searching for define:css and you will see what I mean.
5 Spelling Uncertainty? Let Google Handle it.
If you are uncertain about the spelling of a word you are searching just add the “?” sign in front of it and it will show you results for all possible word combinations. If you search sun?day, you will get results about sun earth day and the word sun-day too!
6 Get Stock Updates.
Add “stocks:” operator in front of the STOCK TICKER and Google will link to a page showing stock information for those symbols. For instance, [stocks: goog yhoo] will show information about Google and Yahoo.
Know More Google Tricks? Add em below.
If you’re one of the many people that NEVER use the “links” folder in your favorites and can’t keep windows for re-creating it. Here’s how:
[Start] [Run] [Regedit]
Registry Key: HKEY_CURRENT_USER\ Software\ Microsoft\ Internet Explorer\ Toolbar
Modify/Create the Value Data Type(s) and Value Name(s) as detailed below.
Data Type: REG_SZ [String Value] // Value Name:
LinksFolderName
Value Data: [Set the String Value to a blank string]
Open Internet Explorer and manually delete the Links folder from Favorites Menu. The Links folder will not be recreated. Exit Registry and Reboot.
Some don’t like my shared documents folder option. If you are one of that, here is a trick to remove it.Open registry editor by going to START-RUN and entering regedit.
Once in registry, navigate to key HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer \ My Computer \ NameSpace \ DelegateFolders You must see a sub-key named {59031a47-3f72-44a7-89c5-5595fe6b30ee}. If you delete this key, you have effectively removed the my shared documents folder.
Open Regedit by going to START - RUN and type Regedit and hit enter. Then you should navigate to following entry in registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\
Desktop\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E} and delete it. This action should remove recycle bin from your desktop.