Results 1 to 4 of 4

Thread: How to Manipulate String using PHP String Functions

  1. #1
    Join Date
    Oct 2008
    Posts
    101

    How to Manipulate String using PHP String Functions

    I know there are couple of ways through which we could manipulate the String into other form, but I am unaware about the different method that could be implement to see change effect, so please let me know what are the PHP string functions, that could be used.

  2. #2
    Join Date
    Oct 2008
    Posts
    132

    Re: How to Manipulate String using PHP String Functions

    Following are the more powerful string handling and manipulating functions take a look at the POSIX regular expression functions and the Perl compatible regular expression functions.

    convert_uudecode() ->Decodes a uuencoded string
    convert_uuencode() ->Encodes a string using the uuencode algorithm
    htmlentities() ->Converts characters to HTML entities
    htmlspecialchars_decode() ->Converts some predefined HTML entities to characters

  3. #3
    Join Date
    Jan 2009
    Posts
    140

    Re: How to Manipulate String using PHP String Functions

    programming languages for manipulating strings is great idea to create own string functions by combining PHP built in functions so you get exactly what you want. A function is like a subroutine. It is a predefined set of commands that are executed when the function is called. Functions can be as simple or complex as desired, and can contain other functions within themselves. Creating functions is always a good idea if you think you will do a thing more than once, or if the code gets to messy just move out some lines as a function with a good name and use it! Most programmers have files with good functions to use in all projects, and string functions are a great thing to have there.

  4. #4
    Join Date
    Feb 2009
    Posts
    105

    Re: How to Manipulate String using PHP String Functions

    Following are some of the PHP functions that I know and I have implemented in my program.

    trim

    It’s only purpose is to remove “white spaces”. It might sound unuseful, but if you think about a use writing something in your newly created input field in a form and often accidently puts in a space in the end.

    PHP String Extract

    We can use php built in string function to create a function which can be used in various applications to collect part of a string.

    strpos(string,whatToFind,start)

    This is a function you will most guaranteed use pretty often, and need to know how to handle!

Similar Threads

  1. Convert XML string into DOM
    By GreatThinker in forum Software Development
    Replies: 6
    Last Post: 22-07-2010, 09:48 AM
  2. VB : How can I make the use String functions
    By Fielder in forum Software Development
    Replies: 3
    Last Post: 19-01-2010, 01:10 PM
  3. How to get a random value from a string
    By kamina23 in forum Software Development
    Replies: 4
    Last Post: 22-10-2009, 10:51 PM
  4. String as Currency in C#
    By ADELIO in forum Software Development
    Replies: 3
    Last Post: 09-07-2009, 12:04 PM
  5. Difference between capacity and size functions of string class
    By DimitrisLiatsos in forum Software Development
    Replies: 5
    Last Post: 25-10-2008, 05:07 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,911,012.21853 seconds with 17 queries