#1  
Old 6th January 2009, 23:10
edge edge is online now
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,035
Thanks: 267
Thanked 153 Times in 133 Posts
Default PHP Array question / help

I have an array named 'From'.
When I do a var_dump like this:
Quote:
var_dump($results['From']);
It will show me this:
Quote:
array(1) { [0]=> array(2) { ["address"]=> string(11) "my@emailaddress.com" ["name"]=> string(4) "Edge" } }
Now how do I put my@emailaddress.com in a sting named $my_email ?
I've tried $my_email = $results['From[11]'] , but with no luck.

Anyone here who can help?
__________________
Never execute code written on a Friday or a Monday.

Last edited by edge; 6th January 2009 at 23:18.
Reply With Quote
Sponsored Links
  #2  
Old 7th January 2009, 08:26
Ben Ben is offline
Moderator
 
Join Date: Jul 2006
Posts: 1,029
Thanks: 7
Thanked 62 Times in 56 Posts
Default

though tooo far above the edge

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

PHP Code:
$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
Reply With Quote
The Following User Says Thank You to Ben For This Useful Post:
edge (8th January 2009)
  #3  
Old 7th January 2009, 23:37
edge edge is online now
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,035
Thanks: 267
Thanked 153 Times in 133 Posts
Default

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.
__________________
Never execute code written on a Friday or a Monday.
Reply With Quote
  #4  
Old 8th January 2009, 08:29
Ben Ben is offline
Moderator
 
Join Date: Jul 2006
Posts: 1,029
Thanks: 7
Thanked 62 Times in 56 Posts
Default

Ah I see, I guess you mean this pear Class?
Reply With Quote
  #5  
Old 8th January 2009, 10:46
edge edge is online now
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,035
Thanks: 267
Thanked 153 Times in 133 Posts
Default

Quote:
Originally Posted by Ben View Post
Ah I see, I guess you mean this pear Class?
yes thats what it is.
__________________
Never execute code written on a Friday or a Monday.
Reply With Quote
  #6  
Old 4th February 2009, 07:53
channerhewitt channerhewitt is offline
Junior Member
 
Join Date: Feb 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by Stenna View Post
you can solve this problem with the help of w3schools.com.you can use this site for solve out your problem .
yeah right, I used to learn PHP on site too.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 17:26
ISP Config hesitation when opening web pages frankb Installation/Configuration 7 15th December 2008 13:06
ispconfig php 5 errors itamarjp Installation/Configuration 8 25th April 2008 10:20
network issues now it says "401 The web site is blocked by administrator" Check General 3 26th February 2008 14:22
Apache2 Freezes celtic Server Operation 31 28th May 2007 17:18


All times are GMT +2. The time now is 23:08.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.