www.webdeveloper.com
Results 1 to 3 of 3

Thread: PHP <<< equivalent in js

  1. #1
    Join Date
    Dec 2011
    Posts
    2

    PHP <<< equivalent in js

    Hi Techies,

    In JS, does we have any equivalent of php <<< operator or something similar to it?

    In php, we could load any character(s) wrapped within labels:
    Code:
    $str=<<<LABEL;
       Anything here
       Anything here
    LABEL;
    How to replicate this in js?
    Code:
    var str=???

    Thanks,
    Shiv

  2. #2
    Join Date
    Aug 2007
    Posts
    3,767
    You can't, but there's nothing to stop you doing stuff like this.
    Code:
    var str = "Here is a string "+
    "and another bit of it";
    // But not
    var str = "Here is a string "
    + "and another bit of it".

  3. #3
    Join Date
    Dec 2011
    Posts
    2
    Thank u!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles