www.webdeveloper.com
Results 1 to 2 of 2

Thread: PHP Escape

  1. #1
    Join Date
    Feb 2011
    Posts
    24

    PHP Escape

    how can I escape this string? I want to print it letter for letter

    echo '"hello\nsup?"replace(/\n/g,',').replace(/\s/g,' ').replace(/ ,/g,',');";

    and i want it to print
    "hello\nsup?".replace(/\n/g,',').replace(/\s/g,' ').replace(/ ,/g,',');


    Thanks

  2. #2
    Join Date
    Feb 2011
    Posts
    24

    I figured it out

    echo '"hello\nsup?".replace(/\\n/g,\'<br />\').replace(/\\s/g,\' \').replace(/ ,/g,\'<br />\');';

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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