We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,901 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Issue with text on website

    I have an issue when I add "" around text in the statement below. With out it works fine but when I add it the whole page is blank. Can someone please help me out on this one. I need to have the quotes in the verbiage.

    **This works:**

    $lang["t_tech_v26_content"]="We have founded this net operation in 1988, only the finest work for more than 20 years.<br> <br> Many of our clients are small to medium companies. <br> <br> we're proud to be members of the National Review Board and the Area Chamber of Commerce. Together, we have a united goal to provide the best for everyone 'in technology' the best that it can possibly be, said Joe Smith, Owner.";
    **
    This is the code we need to work with the added " ".**

    $lang["t_tech_v26_content"]="We have founded this net operation in 1988, only the finest work for more than 20 years.<br> <br> Many of our clients are small to medium companies. <br> <br>”we're proud to be members of the National Review Board and the Area Chamber of Commerce. Together, we have a united goal to provide the best for everyone 'in technology' the best that it can possibly be”, said Joe Smith, Owner.";
4
Contributors
4
Replies
22 Hours
Discussion Span
11 Months Ago
Last Updated
5
Views
Question
Answered
tim_ver
Newbie Poster
7 posts since May 2005
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Hi
If you want to add double quotes inside a string, put the string between simple quotes:

$variable = 'some "text" in this string';

Or, escape the quotes:

$variable = "some \"text\" in this string";
MarPlo
Junior Poster in Training
55 posts since Apr 2012
Reputation Points: 1
Solved Threads: 15
Skill Endorsements: 0

It is kinda hard to read your post. Please use the Code button next to Italic to add the code you want to tell us about. Otherwise, leave your post normal like ours.

Cheers,

rotten69
Master Poster
747 posts since May 2011
Reputation Points: 36
Solved Threads: 47
Skill Endorsements: 11

Hello,
use PHP addslashes function
The addslashes() function returns a string with backslashes in front of predefined characters.

addslashes($message);
rajengg
Newbie Poster
19 posts since Jun 2012
Reputation Points: 0
Solved Threads: 9
Skill Endorsements: 0

MarPlo - Thank you for the fast reply the second option: escape the quotes worked perfect.

Rotten: Sorry. new to the board next time I will hit the code button.

tim_ver
Newbie Poster
7 posts since May 2005
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
Question Answered as of 11 Months Ago by rotten69, MarPlo and rajengg

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0754 seconds using 2.84MB