Jump to content

Search the Community

Showing results for tags 'printf'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. Hi All, I'm trying to return HTML page contains the Russian characters sent as POST variables and also static data as part of HTML result. I'm not able to put it work together. If I set windows-1251 - the static data displayed incorrectly. If I set UTF-8 - the dynamic (POST) data displayed incorrectly Any thoughts? Thank you very much in advance, Evgeny Following is the simple HTML example and also Fiddler request example <?php header('Content-Type: text/html;charset=windows-1251'); $firstName = $_POST["from"]; $subject = $_POST["subject"]; $message = $_POST["message"]; $version = phpversion(); $messageToSend = " <html> <meta http-equiv='Content-Type' content='text/html; charset=windows-1251'> <head> <title>Christiada2033 automatic email</title> </head> <body> <p>Static russian: По-русски</p> <table> <tr> <td>Version:</td> <td>$version </tr> <tr> <td>Static russian: Отправитель:</td> <td>Post value russian: $firstName</td> </tr> <tr> <td>Static russian: Тема:</td> <td>Post value russian: $subject</td> </tr> <tr> <td>Static russian: Сообщение:</td> <td>Post value russian: $message</td> </tr> </table> </body> </html> "; printf($messageToSend); die(); ?> =====================Fiddler===================== POST http://myhost/mysite/mail_html2.php HTTP/1.1 Host: myhost Connection: keep-alive Content-Length: 132 Cache-Control: max-age=0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Origin: http://localhost User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36 Content-Type: application/x-www-form-urlencoded Referer: http://myhost/mysite/Mail_Html2.shtml Accept-Encoding: gzip,deflate Accept-Language: en-GB,en;q=0.8,en-US;q=0.6,ru;q=0.4,he;q=0.2 from=%C8%E2%E0%ED+%CF%E5%F2%F0%EE%E2&subject=%D2%E5%EC%E0&message=%CF%F0%E8%E2%E5%F2%2C+%EF%F0%E8%E2%E5%F2%21&submit=Submit+Feedback =====================Fiddler=====================
  2. Hi I want to make a table that has table rows like this: There are 3 horses in the sky. There are 4 cows in the stable. There are 5 dogs in the sea. The numbers, the animal names and the places have to be placed neatly below each other, so therefore I probably need to use the <td></td>. I tried using the printf ($format, $number, $animal, $place) function, and the array's $number=array(3,4,5); $place=array(sky,stable,sea); $animal=array(horses, cows, dogs); But I only get one tablerow that says (, There are, Array, Array, in the, Array); Can anyone please tell me what code I have to use to make this? Thanks already.
×
×
  • 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.