PHP Array question / help

Discussion in 'Programming/Scripts' started by edge, Jan 6, 2009.

  1. edge

    edge Active Member Moderator

    I have an array named 'From'.
    When I do a var_dump like this:
    It will show me this:
    Now how do I put [email protected] in a sting named $my_email ?
    I've tried $my_email = $results['From[11]'] , but with no luck.

    Anyone here who can help?
     
    Last edited: Jan 6, 2009
  2. Ben

    Ben Active Member Moderator

    though tooo far above the edge ;)

    It's a 2 dimensional array (seen from the element "From"), the second is with named keys...

    PHP:
    $my_email $result['From'][0]['address'];
    Just a question, where does this structure is build from as it looks pretty complicated for such usage. Especially I do not understand for what the 1st dimension in "from" is needed, as an email normally has only one sender ;)
     
  3. edge

    edge Active Member Moderator

    Thank you Ben.
    Your input helped (and worked) :)

    re: Just a question, where does this structure is build from as it looks pretty complicated for such usage

    It's part of a PHP MIME decoding function that I'm trying to use for one of my projects.
     
  4. Ben

    Ben Active Member Moderator

    Ah I see, I guess you mean this pear Class?
     
  5. edge

    edge Active Member Moderator

    yes thats what it is.
     
  6. channerhewitt

    channerhewitt New Member

    yeah right, I used to learn PHP on site too. :)
     

Share This Page