imcfanboy Posted February 28, 2015 Share Posted February 28, 2015 I've a mailtext and I want to set one element of the text strong. How is this possible?this is my text: $mailtext .= $name.$trenner.$einzelwert.$trenner2; $name should be strong Link to comment Share on other sites More sharing options...
Ingolme Posted February 28, 2015 Share Posted February 28, 2015 Is your mail being sent with a text/html content type header? Link to comment Share on other sites More sharing options...
imcfanboy Posted March 1, 2015 Author Share Posted March 1, 2015 yes Link to comment Share on other sites More sharing options...
Ingolme Posted March 2, 2015 Share Posted March 2, 2015 You can just add <b> tags to the content if you want part of it bold. $mailtext .= '<b>' . $name . '</b>' . $trenner . $einzelwert . $trenner2; The mail client will interpret it properly if the Content-type header is set to text/html 1 Link to comment Share on other sites More sharing options...
sandeepm Posted March 2, 2015 Share Posted March 2, 2015 use <?php echo "<strong>" . $string. "</strong>"; ?> Link to comment Share on other sites More sharing options...
thescientist Posted March 2, 2015 Share Posted March 2, 2015 use <?php echo "<strong>" . $string. "</strong>"; ?> The OP is asking how to bold text in an email Link to comment Share on other sites More sharing options...
Ingolme Posted March 3, 2015 Share Posted March 3, 2015 <strong> also works in email, but I use <b> because it's not clear whether the words are meant to have emphasis on them or not. Screen readers ignore <b> tags while pronouncing <strong> elements with a change in tone of voice. Link to comment Share on other sites More sharing options...
thescientist Posted March 3, 2015 Share Posted March 3, 2015 The example he gave used echo. That would not be part of email sending code. edit: possibly it was meant as a generic example. That could have been a poor interpretation on my part then Link to comment Share on other sites More sharing options...
technologyparter Posted March 14, 2015 Share Posted March 14, 2015 use <?php echo "<strong>" . $string. "</strong>"; ?> Link to comment Share on other sites More sharing options...
westman Posted March 16, 2015 Share Posted March 16, 2015 try... $mailtext .= '<b>' . $name . '</b>' . $trenner . $einzelwert . $trenner2;or$mailtext .= '<strong>' . $name . '</strong>' . $trenner . $einzelwert . $trenner2; as mentioned above. Link to comment Share on other sites More sharing options...
thescientist Posted March 17, 2015 Share Posted March 17, 2015 try... $mailtext .= '<b>' . $name . '</b>' . $trenner . $einzelwert . $trenner2;or$mailtext .= '<strong>' . $name . '</strong>' . $trenner . $einzelwert . $trenner2; as mentioned above. No need to repeat what has already been said a couple times already. If the OP is not watching the thread anymore, nothing we can do about it Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now