473,386 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Problem with double quotes

Hii all can u help me in resolving my prob...with doubles= quotes..

in my case ::

I hav a sentence called " 6-medium tomatoes, chopped into 1/4" chunks".....but its giving me error....ie the text after 1/4" is not getting displayed...
Aug 9 '07 #1
3 1166
ak1dnar
1,584 Expert 1GB
Moved to Php-Forum from Php-Articles.
Aug 9 '07 #2
ak1dnar
1,584 Expert 1GB
Hii all can u help me in resolving my prob...with doubles= quotes..

in my case ::

I hav a sentence called " 6-medium tomatoes, chopped into 1/4" chunks".....but its giving me error....ie the text after 1/4" is not getting displayed...
Hi vijaykumarkakatkar,
Welcome to TSDN !

Could you please elaborate your question !
Thanks!
Aug 9 '07 #3
nathj
938 Expert 512MB
Hii all can u help me in resolving my prob...with doubles= quotes..

in my case ::

I hav a sentence called " 6-medium tomatoes, chopped into 1/4" chunks".....but its giving me error....ie the text after 1/4" is not getting displayed...
The reason the text after 1/4 is not being sisplayed is that you have ended the quotes.

I reccommend, and there are other ways, the following:
[php]
$lcSentence = '6-medium tomatoes, chopped into 1/4 \'chunks\'' ;
echo $lcSentence ;
[/php]

This will output:
6-medium tomatoes, chopped into 1/4 'chunks'

Which, if I understand you correctly, is what you are after.

Brief Explanation:
The use of \ indicates that the following character is to be treated as part of the string and so it adds ' to the string rather than ending the string, which is what happens in your original code. It may be worth taking a look at the PHP manual for this.

Cheers
nathj
Aug 9 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Mosher | last post by:
Hi all, I have an issue with php and/or mysql. I have a php form that writes "items" to a mysql database, including a description of the item. On the mysql server, "magic_quotes_gpc" is ON. I...
9
by: madsgormlarsen | last post by:
$tdsubclass=<<<bumelum <td><a href="http://www.ygabel.php/$artnr" ="" onmouseout=" function onmouseout(event) { window.status = "Done"; return true; } " onmouseover=" function...
1
by: Aaron | last post by:
how would i use document.write to write this input box? i can do it without quotes but i need them for my purpose <input type="textbox" name="input" value="something"> i did this but it...
5
by: suslikovich | last post by:
Hi everyone, I have a problem synchronizing two list boxes on a form. I want to display information in the second box based on the selection in the first box. First box (List0)lists all company...
4
by: (PeteCresswell) | last post by:
Is his just a flat-out "No-No" or is there some workaround when it comes time for SQL searches and DAO.FindFirsts against fields containing same? I can see maybe wrapping the value searched for...
12
by: Jeff S | last post by:
In a VB.NET code behind module, I build a string for a link that points to a JavaScript function. The two lines of code below show what is relevant. PopupLink = "javascript:PopUpWindow(" &...
5
by: Tim::.. | last post by:
Can someone tell me how I convert this simple SQL statement so I can use it in ASP.NET??? I have an issue with the quotation marks and wondered if there is a simple rule for converting the sql...
23
by: Haines Brown | last post by:
I tried changing font-family from helvetica to arial and discovered that I loose typographic quotes, etc. (for example, if I have “ in a page, the double opening quotation mark is not curly). ...
15
by: abracad_1999 | last post by:
I am trying to populate a table with the following insert query run through phpmyadmin. When I attempt to run it phpmyadmin just freezes. After a while "Fatal error: Maximum execution time of 300...
1
by: Yearwood | last post by:
Hi, I'm basically trying to import a CSV into an ACCESS database. Sample date is shown below: "",10173,"Development Manager - Social Economy Sector","Trust Bank",10153,,"Lolalll Pudd","Meet the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.