SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2003
    Location
    Belgium
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Escape a char (simple problem)

    I don't know how to escape a character in a string. I thought it should be with \ , but that doesn't work.
    I want to do a printf of some HTML code. This html code contains %, and this has a special meaning in PHP. How do I escape this?

    PHP Code:
    printf("<table width='100%'>"); 

  2. #2
    SitePoint Guru Husain's Avatar
    Join Date
    Sep 2001
    Posts
    620
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use echo instead of printf.


Bookmarks

Posting Permissions

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