Christophe Fongemie
Christophe Fongemie

Reputation: 3

Get data drom array saved in database

I need to read arrays saved in database to get specific variables.

Array
(
[0] => PHPMailer Object (
                  [From] => [email protected]
                  [FromName] => John Doe
      )
)

I tried

echo "From".$row[0]["From"];

But it returns

From : P

Upvotes: 0

Views: 35

Answers (2)

suda
suda

Reputation: 2644

PHPMailer has a From property. You should be able to access it like this:

echo("From: " . $row[0]->From);

Upvotes: 1

B. Desai
B. Desai

Reputation: 16446

From and FromName are object so you can get it using ->. try:

echo "From".$row[0]->From;

Upvotes: 1

Related Questions