Jump to content

Search the Community

Showing results for tags 'wrox php'.

  • 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 1 result

  1. I have been studing php using a book named Wrox PHP. So far I have had alot of trouble getting the code to work. I have had to us work arounds to get the results I am suppose to get. Here is the code the way it is in the book: " <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Circle Properties</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/> <meta http-equiv="content-style-type" content="text/css"/> <link href="common.css" rel="stylesheet" type="text/css"/> </head> <body> <?php $radius = 4; $diameter = $radius * 2; $circumference = M_PI * $diameter; $area = M_PI * pow($radius, 2); echo "This circle has...<br />"; echo "A radius of " . $radius . "<br />"; echo "A diameter " . $diameter . "<br />"; echo "A circumference of " . $circumference . "<br />"; echo "An area of " . $area . "<br />"; <div class="logos"> <p><a href="http://httpd.apache.org/"><img src="/icons/apache_pb2.gif" alt="[ Powered by Apache ]"/></a> </div> </body> </html> Here is what works: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd$ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Circle Properties</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/> <meta http-equiv="content-style-type" content="text/css"/> <link href="common.css" rel="stylesheet" type="text/css"/> </head> <body> <?php $radius = 4; $diameter = $radius * 2; $circumference = M_PI * $diameter; $area = M_PI * pow( $radius, 2); echo "This circle has...<br />"; echo "A radius of "; echo $radius; echo "<br /> A diameter of "; echo $diameter; echo "<br /> A circumference of "; echo $circumference; echo "<br /> An area of "; echo $area; ?> <p><a href="http://httpd.apache.org/"><img src="/icons/apache_pb2.gif" alt="[ Powered by Apache ]"/></a> </body> </html> Does the book version look ok to anyone else? What is wrong? Should I abandon the book and get a better one some one knows about?
×
×
  • 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.