Jump to content

Simple question


448191

Recommended Posts

I've got a simple question (Yes, I do those too  :P).

What was that thing again, whatsjemecallit, you use so you can use both single and double qoutes without having to escape them?

Something like EO>>? A link explaining what it is would be nice also.
Link to comment
Share on other sites

I think it does:

[quote=php.net]Another way to delimit strings is by using heredoc syntax ("<<<"). [b]One should provide an identifier[/b] after <<<, then the string, and then the same identifier to close the quotation.

The closing identifier must begin in the first column of the line. [b]Also, the identifier used must follow the same naming rules as any other label in PHP: it must contain only alphanumeric characters and underscores, and must start with a non-digit character or underscore. [/b][/quote]
Link to comment
Share on other sites

Sort of. It behaves identically to double quotes(ie expands variables), but you don't actually use double double quotes, so you can include double quotes in the string without having to escape them.

To bad there isn't an equivalent that mimics single quotes, since that's what I'd prefer. (or is there?  ::))
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.