Jump to content

\ Does not work!


ivoilic

Recommended Posts

You don't need quotes around this variable at all.  Escaped quotes are only supposed to be used inside of other quotes.  They are necessary here:

 

$string = "Dan says \"escaping your quotes is only necessary inside of strings\" because that's the kind of thing he says.";

Link to comment
Share on other sites

Please read the responses, the experts here are worth a lot of money, you're getting thousands of dollars worth of professional help for free. 

 

You don't need quotes around this variable at all.
I told you that you don't need quotes at all, and you added MORE quotes.
Link to comment
Share on other sites

I figured it out!  I need a second pair of quotes outside of the first set.

 

ManiacDan has a good point. If you are not going to take the time to read and understand the responses, why bother posting at all? I have no idea why you feel the need to add slashes to that bit of code, but they are not needed at all, as ManiacDan has already pointed out. Rather frustrating.

 

Link to comment
Share on other sites

Please allow me to explain:  My goal was to have quotes automatically added around text entered by the user.  I didn't realize that for the slashes to work I needed a second set of quotes.  I apologize for wasting the time of anyone here.  I will be more clear next time.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.