Rainrays Profiles
 
English
   Super Hit Music FM Radio | Submit Your Free Ads | Tours & Travel India

Home rainrays profile world Contact Us Online Free Marketing Aadhaar Card Online Free Marketing Pregnancy & Care Online Free Marketing Tour n Travel Free Ads with rainrays Festivals  Tourist Attraction India Pincode India  Tourist Attraction India Tourist Attraction India Jobs Herbalife Club Online Fm radio Recipes Jobs Select Babies Name

 
Custom Search
More Topics...
  Pregnancy tips and care  Pregnancy tips and care
 YouTube Videos YouTube Videos
  Hospitals & clinics in India Hospitals & clinics in India
  Hospitals & clinics in India World Travel Tips
 Kitchen Dictionary Kitchen Dictionary
 Recipes Recipes
 Personality Personality
 Institute/Colleges Institute/Colleges
 Indian Festivals Indian Festivals
 University University
 Restaurant Restaurant
 Districts List in India Districts List in India
 Districts Profile of India Districts Profile of India
 Hotels Hotels
 BSNL STD Codes (INDIA) BSNL STD Codes (INDIA)
 Love dating and Romance Love dating and Romance
 Baby name list Baby name list
 Jobs by location Jobs by location
 Jobs by Keyword Jobs by Keyword
 Jobs by Function Jobs by Function
 Jobs Part Time Jobs Part Time
 Shayari Shayari

Best Indian Tours
 Week End Tours  Week End Tours
 Wildlife tours Wildlife tours
 Honeymoon  Honeymoon Tours
 Religious Tours Religious Tours
 Religious Tours International Tours
 Religious Tours Indian Tours for Overseas
 

String

 Topic » Language » PHP » String
   
1

 strpos() and stripos()
 int strpos ( [string $mystring] , [mixed $findme], [int $offset] ) return position of first occurrence of a string Note: counting start from '0'. The string '$str' was found in the string '$strng'
"; echo " and exists at position $pos"; ?> o/p: The string 'a' was found in the string 'my job is account teacher' and exists at pos..
 strip_tags()
Mostly this function is use in front end of website when we fill the form this function Strip HTML and PHP tags from a string string strip_tags ( [string $str], [string $allowable_tags] ) we can understand this function with the help of example:  

Hello World.

My text'; echo $text_data; echo "
"; echo strip_tags($text_data); echo "
"; // Allow

an..

 explode() Split a string into Array
 explode() Split a string into Array array explode ( [string $delimiter] , [string $string] , [int $limit]  ) EX: "; print_r(explode('|', $strng, 1)); echo "
"; print_r(explode('|', $strng, 2)); echo "
"; print_r(explode('|', $strng, 3)); echo "
"; // negative limit (since PHP 5.1) print_r(explode('|', $strng, -1))..
 number_format(number,decimals,decimalpoint,separator)
number_format(number,decimals,decimalpoint,separator) number:Be formatted. decimals:For how many decimals place(Optional). decimalpoint: decimal indicator(Optional). separator: Default value is",".But ew can use other separator(Optional). Ex: ";     echo number_format("9999009",3)."
";     echo number_format("99999999&qu..
 String Formating Functions
lcfirst( string $string ): First character of string in lowercase ucfirst(string $string): First character of string in uppercase ucwords(string $str): Returns a string with the first character of each word in uppercase strtoupper(string $string): Make a string in uppercase strtolower(string $str): Make a string in lowercase Other sscanf() - Parses input from a string according to a format sprintf() - Return a formatted string printf() - Output a formatted string nl2br():Inserts HTML ..
 implode():Array elements convert into a string
string implode ( [string $glue] , [array $pieces] )   Return a string value O/P: Somesh:Birjesh:Raju O/P: Somesh:Birjesh:Raju
 htmlspecialchars_decode():Convert special HTML entities back to characters
htmlspecialchars_decode():Convert special HTML entities back to characters   string htmlspecialchars_decode(string $string,int $quote_style) quote_style   ENT_QUOTES Will convert both double and single quotes ENT_NOQUOTES Will leave both double and single quotes unconverted ENT_COMPAT Will convert double-quotes and leave single-quotes alone (default) It will return covrrted string   $strng = ' this ->"Pankaj" ';   echo htmlspecialchars..
 htmlspecialchars():Convert special characters to HTML entities
string htmlspecialchars ( [string $string], [int $quote_style], [string $charset], [bool $double_encode = true] ) '>' (greater than) becomes '>' '<' (less than) becomes '<' '&' (ampersand) becomes '&' ' ' ' (single quote) becomes ''' only when ENT_QUOTES is set. ' "' (double quote) becomes '"' when ENT_NOQUOTES is not set. return value is converted string
 htmlentities():Convert all applicable characters to HTML entities
string htmlentities ([string $string ], [int $quote_style] , [string $charset]) quote_style ENT_NOQUOTES    Will leave both double and single quotes unconverted. ENT_QUOTES    Will convert both double and single quotes. ENT_COMPAT    Will convert double-quotes and leave single-quotes alone. EX: bold";      echo htmlentities($strr).&qu..
 html_entity_decode():Convert all HTML entities to their applicable characters
string html_entity_decode ( string $str, int $quoteStyle, string $charset ) str is: any type string quoteStyle are: ENT_NOQUOTES    Will leave both double and single quotes unconverted. ENT_QUOTES    Will convert both double and single quotes. ENT_COMPAT    Will convert double-quotes and leave single-quotes alone. EX: dog now";     $a = htm..
 crc32(),md5(),sha1()
crc32(): Calculates the crc32 polynomial of a string sha1():Calculate the sha1 hash of a string   "; $val = md5("Pankaj Raghuwanshi"); echo $val; echo "
"; $val = sha1("Pankaj Raghuwanshi"); echo $val; ?> O/P: -2098577348 a1404e25c65cb59ecbf6a41fc1c18757 8781c12f429d3c441c79d335555e3793fc4cf927  
 count_chars(): Return information about characters used in a string
 Return information about characters used in a string count_chars ( string $string [, int $mode = 0 ] ) count_chars ( 'The examined string', 'See return values' ) Ex:   $val) {    echo "There were $val instance(s) of "" , chr($i) , "" in the string.
"; } ?>   O/P: There were 4 instance(s) of " " in the ..
 chunk_split():Split a string into smaller chunks
Split a string into smaller chunks string chunk_split ( string $str [, int $chunklength = 76 [, string $end = "rn" ]] ) string chunk_split ( 'The string to be chunked.','The chunk length.', 'The line ending sequence.' ) Ex. O/P: be a3 af 90 e3 db f2 86 ba c5 4c b6 1f 4d c0 fc
 chr(): Return a specific character
Return a specific character The ascii code. Ex. O/P: o/p of function: --b--
 substr_replace(): Replaces text within a portion of a string
Replacing Substrings string substr_replace ( string str, string replacmnt, int start [, int len] ) replace the entire instance (say, by changing the ever-so-clichéd "Hello World!" into the more "l33t" phrase "H3110 W0r1d!" and hence proving your "l33t" status), you could simply invoke the substr_replace() function as shown in the following example
 strstr():Finds the first occurrence of a string
string strstr ( string str, string needle ) string stristr ( string str, string needle ) Ex. O/P: .xxx.com In this example in which you are attempting to find the domain name of the current string, the strstr() function finds the first instance of the dot (.) character and then outputs everything starting with the first instance of the dot. In this case, the output would be `.xxx.com`.
 substr(): Returns a piece of a string
string substr ( string string, int start [, int length] )  = 30){     echo substr ($str,0,29); } else {     echo $str; } ?>  O/P: Hello, how are you today? I a
 substr_count()
Counts the number of substring occurrences  php program function searchtext ($haystack, $needle){     if (substr_count ($haystack, $needle) == 0){           echo "No instances were found of this search query";     } else {         $startpos = 0;         $lookagain = true;        while ($lookagain){ ..
   
1
 
 
 
Special Tours Type India
 Week End Tours  Week End Tours
 Wildlife tours Wildlife tours
 Honeymoon  Honeymoon Tours
 Religious Tours Religious Tours
 International Tours International Tours
 Tours for Overseas Indian Tours for Overseas
More on rainrays.com
Top Links : FM Radio | Contact us | About us | Privacy & Policy | Terms & Condition | Extract Email | Submit URL to Search Engine | Sitemap
Net Search : For Cooking | Word Dictionary | Encyclopedia Search | Find Location by MAP | Find a Person | Find Your Shipping | Stock Market | Language Converter
Jobs : Jobs by Location | Part Time Jobs | Jobs by Function | Jobs by Keyword | Jobs Out of india | Jobs Search Engine
Other Links
    Girl baby Names | Boy baby Names | Love dating and Romance | University | Restaurants in India | Hotels in India | Hospitals & clinic
    Coaching Institute | Educational Institution | School/Colleges by Loaction | Recipes | STD Code | PHP
PHP Interview Question | Indian Festivals | Districts Profile of India | Kitchen Dictionary

Copyright © 2010 --- All Rights Reserved