Archive: Posts Tagged ‘Tips’

Do Not Show My Web Page In Search Engine Results. How To?

So, you want to hide your web page (URL/link) from search engine bots and do not want to use robots.txt. You can do this with the help of noindex meta tags. Just put the below code in your web page code, anywhere after <head> and before the closing </head> tag.
Continue reading…

Share or Bookmark this Post:
  • StumbleUpon
  • Digg
  • Twitter
  • del.icio.us
  • Facebook
  • Mixx
  • MySpace
  • Reddit
  • Google Bookmarks
  • Yahoo! Buzz
  • Technorati
  • Live
  • DZone
  • Netvibes
  • RSS
  • Print

How to strip excess whitespace from a string with preg_replace()

PHP provides many pre-defined methods to deal with strings. One of the strong way to deal with strings is to use regular expressions aka ‘regex‘.

Let’s use regular expression with preg_replace() method to strip excess whitespace from a string.

Share or Bookmark this Post:
  • StumbleUpon
  • Digg
  • Twitter
  • del.icio.us
  • Facebook
  • Mixx
  • MySpace
  • Reddit
  • Google Bookmarks
  • Yahoo! Buzz
  • Technorati
  • Live
  • DZone
  • Netvibes
  • RSS
  • Print
Real Time Web Analytics