0

hello,

i want to make strings coming out of database into quotes...the e-mail addresses as they came out should
convert into quotes ..like

abc@abc.com into 'abc@abc.com'.

4
Contributors
9
Replies
27
Views
2 Years
Discussion Span
Last Post by matrixdevuk
0

Or

echo '"{$email}"';

Or

echo '"' . $email . "';

Or

echo '"$email"';

Or even...

echo '"' . htmlspecialchars($email) . '"';

Just sayin'

1

Just sayin'

Some of these won't work...

echo '"$email"'; //will output the literal "$email"
echo '"{$email}"'; //will output the literal "{$email}"

And this doesn't match the OP's needs - I'm assuming single quote from the first post:

echo '"' . $email . "'; //gives "example@example.com" - double quoted
0

@diafol — Oops! I forgot my PHP logic there. Remove the post and I'll leave it to you for this... since your one seems to be logical.

0

@matrixdevuk

I'm afraid it's "post and be damned". We only remove posts in very rare circumstances - usually if they contravene our rules, but almost never at the behest of an user. Sorry. You have approx. 30 minutes to edit your post from first publication. I know that doesn't help you right now, but useful info for another time maybe.

0

I think it should be pretty clear from the explanations that follow. I can't see any imperative to edit.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.