473,473 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problems in removing double quotations

2 New Member
I am eager to replace double quotations in the output that is being displayed.

input text : This is "within quotes"
output text: This is <p class="quotes">within quotes</p>

I have worked out something like this
Expand|Select|Wrap|Line Numbers
  1. $text = ereg_replace(' "[A-Za-z0-9. -]+"',"<p class=\"quotes\">\\0</a>", $str);
  2.  
But i dont feel that its really good enough as the quotes still remain.Any suggestions will be very helpful.

Thanks Nargish
Oct 2 '07 #1
2 1492
Atli
5,058 Recognized Expert Expert
Hi Nargish. Welcome to The Scripts!

If you are simply looking to remove the quote marks you could do something like this:
Expand|Select|Wrap|Line Numbers
  1. # Note that I use \ as an escape character, so that
  2. # PHP knows I want to use the " char, rather than close
  3. # the string.
  4. echo str_replace("\"", "", $inputText);
  5.  
Oct 3 '07 #2
nargish
2 New Member
Thanks Atli, for your suggestion .But i want to keep the quotes present in anchor tag intact.I just want to give the quotations a new look.

Thank you,
Nargish
Oct 3 '07 #3

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

Similar topics

1
by: Elmo Watson | last post by:
Ok - I've got a datalist - in the template, there is a hyperlink, in which, I need to dynamically use the record's ID inside a Javascript function (a popup window function, which works perfectly...
3
by: Ant | last post by:
Hi, how do you output a string that will be seen with double quotatios? I'd like to display: This is my "Value". by doing something like: string op = "This is my " + " +...
6
by: Kondapanaidu | last post by:
Hi, I am using C#V1.1. How to add double quotations to a string. If I go with "\"" the back slash is going to be added to the assigned string. EX: string str="naidu" + "\"" + "GK" + "\"";
0
by: Julien Fiore | last post by:
Hi, I have problems trying to install the scipy.weave package. I run Python 2.4 on windows XP and my C compiler is MinGW. Below is the output of scipy.weave.test(). I read that the tests should...
6
by: an0011 | last post by:
Hi static double *var = (double*) malloc(100000*sizeof(double)); is used among other memory allocations to store data that comes from a ..mat file The declarations are done on the main .cpp...
0
by: kellner | last post by:
Hello, I'm parsing a chunk of XML code and would like to add attribute values to individual tags if these are lacking. This is with perl 5.8.6, libxml2 2.6.17, XML::LibXML 1.58. Basically, I...
3
by: devecibasi | last post by:
Hi, I am trying to use ShellExecute function to invoke the ax program. The code below works perfect: ShellExecute(0&, "open", "ax.exe", "C:\2runtemp2.run", "C:\axfolder", 5) The code below...
4
by: bmerlover | last post by:
Hi, I need to read a script file and change the text on the buttons I set. I have the psuedocode in my head, but I'm having trouble putting that into code. I figured out how to seperate B1 from T1...
1
by: bmerlover | last post by:
I'm having trouble reading quotations inside the richTextBox when a file is opened on to it. I've tried a couple different methods, most of them didn't compile. I came across one that does compile...
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.