#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Hong Kong
    Posts
    73
    Rep Power
    15
    for example, there is a character string

    $test="hello <world>";

    i want to know if that string contain
    a "<" or ">", do I have to use the old method
    like we use in C?
    get the length of that string,
    and check it by array?
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    read up on the regular expression functions in the manual
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Hong Kong
    Posts
    73
    Rep Power
    15
    thanks rod
    i got it

    the ereg(); function
    hehe

Similar Threads

  1. array explode ( string separator, string string [, int limit])
    By beemee_freeserv in forum HTML Programming
    Replies: 4
    Last Post: February 5th, 2004, 10:56 AM
  2. mgetty+sendfax on RH9
    By ayrin in forum Linux Help
    Replies: 0
    Last Post: January 31st, 2004, 02:11 AM
  3. Need help with Selection Sort
    By iNspirito in forum C Programming
    Replies: 21
    Last Post: November 29th, 2003, 02:47 AM
  4. Advice on reversing order of characters within a string?
    By FriscoKid in forum C Programming
    Replies: 5
    Last Post: November 13th, 2003, 08:13 AM
  5. finding max string length if more than 2 elements
    By sri197 in forum XML Programming
    Replies: 1
    Last Post: November 7th, 2003, 06:17 PM

IMN logo majestic logo threadwatch logo seochat tools logo