0

How to store string to a variable which contains both single & double quote? The string should be dynamic, not static.

For example : thisis'a"string
another string is : this'i"sastring
The quotes will be vary its position. Is it possible to store these type of string to a variable?
Thank you

3
Contributors
8
Replies
23
Views
3 Years
Discussion Span
Last Post by diafol
0

Yes you either escape it using a backward slash...

But is this a mysql query or something to be displayed in html? What's the background?

0

Thank you for replying.
This is not my sql query. The string is source code of a webpage.
Here is another example.
<a href="link1.html"><img src="im.jpg" title="that's what i am"></a>
In the code the both quotes appearing. There are multiple codes like this and i want to store each of this to a variable.

0

Yea, its from a webpage.
<a href="link1.html"><img src="im.jpg" title="that's what i am"></a>
How to store the above code to a variable?

0

You seem reluctant to show any code that you're using. Show us your code so we hav a better idea of what you're trying to do.

How to store the above code to a variable?

If it's coming from a scrape, the text will already be in a variable, won't it?

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.