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'.
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'.
Use a backslash (eg. echo '\'abc@abc.com\'';)
Or
echo "'$email'";
Or
echo '"{$email}"';
Or
echo '"' . $email . "';
Or
echo '"$email"';
Or even...
echo '"' . htmlspecialchars($email) . '"';
Just sayin'
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
@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.
@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.
Could you edit it so the OP doesn't get confused? Tell them to ignore it.
I think it should be pretty clear from the explanations that follow. I can't see any imperative to edit.
Alright.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.