Jump to content

Assignment for school...


Hillary

Recommended Posts

Create a set of data for your SEA using a simple text editor, like TextPad or NotePad. Do not use a word processor, such as Word. This should be a file set up as a comma separated list (CSV).

Your file should contain 3 or 4 rows. Each row should include the player's name and three or four data items related to statistics. Choose whatever sport you like. For example, if your team is a baseball team you might include games played, at-bats, and hits. At least some of the data items you include must be used in calculating a statistic. Using the baseball advantage, batting average is an example of a calculated statistic. Batting average would not appear in your file, since it can be calculated from at-bats and hits.

Items on a row should be separated by commas, as in the wikipedia example. To keep things simple, avoid spaces and special characters in items. For example, provide only the players last name.

 

 

My Questions are how do i create a CSV? is that a dumb question? also if making a CSV doesn't make this code look cleaner, what the heck will?

 

p.s. im sorry if you hate the phillies, i just needed a team. hahah

 

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN">

<html>

 

<head>

<title></title>

</head>

<body>

<h1><center>Philadelphia Phillies 2008 Season Stats.</center></h1>

 

<table><center>

<tr><th>Player</th><th>Game</th><th>AtBats</th><th>Hits</th><th>Average</th></tr>

 

<tr><td>Rollins</td><td>4</td><td>18</td><td>5</td><td>.278</td></tr>

 

<tr><td>Howard</td><td>4</td><td>14</td><td>3</td><td>.214</td></tr>

 

<tr><td>Burrell</td><td>4</td><td>13</td><td>5</td><td>.385</td></tr>

 

<tr><td>Victorino</td><td>4</td><td>15</td><td>2</td><td>.133</td></tr>

 

<tr><td>Utley</td><td>4</td><td>14</td><td>5</td><td>.357</td></tr>

 

 

</center></table>

 

 

<hr></hr>

 

<?php

 

 

 

?>

 

 

</body>

</html>

 

Link to comment
Share on other sites

I'm assuming you are supposed to create the file using a PHP script.

 

Have a look at file_put_contents() and concatenating strings.

 

www.php.net/file_put_contents

 

http://us2.php.net/manual/en/language.operators.string.php

 

Beyond that, you won't learn anything if we do your homework for you.  If you have any specific questions as to how these work or what something means, just ask.

Link to comment
Share on other sites

May I ask what this class is called, ex. computer apps, entry level web devlopment, and what level of education, high school?

 

Just curious, because my school offers a list of 'computer' classes, and I've always been curious if they are worth the time, although I'm probably ahead of what they might be teaching.

 

And excuse my derailing of this thread.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.