#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Hong Kong
    Posts
    24
    Rep Power
    0
    hi guyz
    i have a string
    'id|s:3:"123";userid|s:6:"tomcat";'

    is there any function in PHP which can
    make it as
    $id='123';
    $userid='tomcat';
  2. #2
  3. No Profile Picture
    Robert_J_Sherman
    Guest
    Devshed Newbie (0 - 499 posts)
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by hkccm:
    hi guyz
    i have a string
    'id|s:3:"123";userid|s:6:"tomcat";'

    is there any function in PHP which can
    make it as
    $id='123';
    $userid='tomcat';
    [/quote]

    Personally, I think I'd try the regular expression function to match the element
    before the "pipe" that would get you
    the "id" and "userid" and also look for the
    "'s that'll get you that data..

    then assign them as you desire.. just a thought.



    ------------------
    SnR Graphics,
    Low Cost Hosting and Web Development.

Similar Threads

  1. Codepupil
    By Adachic in forum C Programming
    Replies: 3
    Last Post: February 6th, 2004, 07:50 PM
  2. array explode ( string separator, string string [, int limit])
    By beemee_freeserv in forum HTML Programming
    Replies: 4
    Last Post: February 5th, 2004, 11:56 AM
  3. mgetty+sendfax on RH9
    By ayrin in forum Linux Help
    Replies: 0
    Last Post: January 31st, 2004, 03:11 AM
  4. Advice on reversing order of characters within a string?
    By FriscoKid in forum C Programming
    Replies: 5
    Last Post: November 13th, 2003, 09:13 AM
  5. error in returned object
    By davidl in forum Java Help
    Replies: 6
    Last Post: October 9th, 2003, 05:34 PM

IMN logo majestic logo threadwatch logo seochat tools logo