Jump to content

slashpine

Members
  • Posts

    70
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

slashpine's Achievements

Member

Member (2/5)

0

Reputation

  1. I have been able to add column headings but I am still unable to get the alternating row color to work ...can someone please show me hos this can be down witht the existing code? Also...(more of a php question) how would I remove a couple of the records in the CSV file NOT to display? Thanks
  2. would it be any more difficult for you to apply it to the script I posted? I'm not a php coder and I was seeking some free syntax... I was hoping it wouldn't be too much trouble...
  3. there is no mysql database...this parses a flat text file (CSV)
  4. I am trying to add both column headings and alternating color rows to this script...can a php coder please code in an example of both in this script? Thanks <?php $filename = "file.csv"; function viewlog($filename) { $fp = fopen($filename,"r"); $file = fread($fp,65535); $replaced = eregi_replace(",", "<td>", $file); $replaced2 = eregi_replace("\n", "<tr><td>", $replaced); $replaced3 = eregi_replace("\r", "<tr><td>", $replaced2); fclose($fp); return $replaced3; } echo "<html><head><title></title></head><body bgcolor=silver>"; echo "<table border=1 bordercolor=black cellspacing=0 cellpadding=5 width=100% style='font-size:10pt'>"; echo viewlog($filename); echo "</table></body></html>"; exit; ?>
  5. ok I got the first part...can anyone help me or show me an example on how to make the columns sortable by column heading?
  6. can you explain this a little further?
  7. hope someone will help a non-coder (just a hack) The following displays the results from a db query...I have two questions.... echo ' <td>'.$row['id'].'</td>'; echo ' <td>'.$row['name'].'</td>'; echo ' <td>'.$row['address'].'</td>'; echo ' <td>'.$row['city'].'</td>'; echo ' <td>'.$row['state'].'</td>'; echo ' <td>'.$row['zip'].'</td>'; 1.) how can I make the results display in a table where I can put a heading at the top each column? 2.) how difficult would it be to be able to sort the columns by the "heading" (column name) Thanks...
  8. use it in place of "foreach($things as $element){ if ($element==$query) echo $query; or with it ?
  9. Thanks...that works great... Now what if I wanted to add a second array that would echo a different message?
  10. Hi, can someone please show me how to use an array rather than a single word string? if ($query=='painters') echo "hellow world";[/php how can I get the echo results if the query is any of the following..."painters","pressure_washing", "property_maintenance", "contractors". ? Thanks in advance...
  11. First let me say thanks for all the great help you folks provide... one more question when I echo the following...some of the actual query text is two words separated with an underscore...how can I change the syntax below to strip the underscore? <?=ucwords($query)?> tia
  12. ok that works but the $query is in () ? I got it now thanks echo "(" . ucwords($query) . ") in Newark";
  13. the problem was it should have been $numresults and not $results sorry I missed this and did not post the reference but I am confused about the mesg database...I do have a db named "mesg" BUT it is NOT the datbase that the script connects to...this is really confusing...???
×
×
  • 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.