Archive: Posts Tagged ‘PHP’

How To Fix PHP Sessions Data Issue In Internet Explorer & In IFRAMES?

Are you web developer? Oh yeah!!! then you must know how much you need to be aware such issues, like some of your web pages, web sites do not work on IE but runs perfectly on other popular browsers, i.e. Firefox, Safari.

Think about a day when you coded for something by spending lot of time on it, and it actually runs perfectly as you want on Firefox, Safari etc, but when you try to look same on Internet Explorer (IE), just one thing came into your mind, Oh Goshhhhhh…. what went wrong with the code which leads to such issues. Your complete page reacts differently and all things got vanished and you just ask yourself, why??? The answer is that Microsoft’s IE takes everything differently as compared to other browsers. What a silly statement this is, Isn’t it? but its all true that even in the IE 7.0 version Microsoft has still not fixed all the issues those existed in IE 6.

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

PHP Function: How To Get The Current Page URL (Address Bar Link)

There are number of times when we need to play with PHP and the pre-defined constants and variables. PHP has a vast number of methods which can help us in dealing with almost all issues. Today, I am gonna share with the trick to find out current page’s URL, yes the link that you see in your browser’s address bar.
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 All Non-Alphabetic Characters From A String?

String manipulation is the common thing to do with web application development. It is very easy to get it done when you are having a complete library to deal with it. PHP has a very vast support on string manipulation and has many functions including regular expressions support.

Sometimes you may need to work with user inputs to get only the alphabets. I searched a lot on google but didn’t find a suitable example to get it done. So I spent time, re-searched on net and created an example for myself and to share with you all. Hope it saves time for you in your development.

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

PHP Functions: How to find strings between start and end from a string?

get_string_between
Today, I was working with some code related to CSV files and converting them to xml files (will talk about xml parsing and conversion later in other posts). I needed a function through which I could get a string from a string by giving a start needle and an end needle.

For example: Given a string variable like: $string = “I am a [string variable]“; and you want to fetch out everything which lies between “[" and "]“. You can use these functions given below to accomplish this task. So you will get the result as “string variable”.

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 change string’s case with PHP functions and with CSS

For a PHP developer, working with databases, arrays, doing string manipulations, etc are common daily tasks. While working with strings, you may sometime require changing case of the sting from lower to upper and vice versa or even you may need to change each word’s case in the given string. You can achieve all these by using following 5 PHP built in functions or you can use CSS property text-transform. Lets start with PHP functions.

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

20 Interesting Facts About PHP: A PHP Developer Should Know

PHP LogoAre you a PHP developer? Do you know all about PHP along with all these facts that I am presenting to you below? I bet you you don’t know at least 10 out of 20. You don’t believe me, lets read all 20 points below and find out how many of them you know already?

As a PHP developer you should know all these facts. I call them interesting because, almost all points surprised me. Though I am a PHP developer from the past 4 years but didn’t know all these facts.

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

Decode JSON data with PHP

JSON, short for JavaScript Object Notation, is a lightweight computer data interchange format. It is a text-based, human-readable format for representing simple data structures and associative arrays (called objects). If you are running your web server with latest PHP package, then it is so easy to decode JSON data with an in-built function of PHP. json_decode() function decodes a json string. It is available in PHP version 5.2 and later.

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