You could have explained your problem in a bit more than two half sentences, since mind-reading doesn't work over the internet. Anyway, from what I understood: www.php.net/strip_tags www.php.net/fopen
<meta name="ProgId" content="FrontPage.Editor.Document"> <title>Top 5 Losers</title> </head> <body> <table> <tr> <td vAlign="top" align="right"><br> <table cellSpacing="0" cellPadding="0" width="100%" bgColor="#969696" border="0"> <tbody> <tr> <td> <table cellSpacing="1" cellPadding="4" width="100%" border="0"> <tbody> <tr> <td class="tablehead" colSpan="9">Top 5 Losers</td> </tr> <tr align="middle"> <td class="specialhead2">Symbol</td> <td class="specialhead2">Open</td> <td class="specialhead2">High</td> <td class="specialhead2">Low</td> <td class="specialhead2">Prev. Close</td> <td class="specialhead2">Last Price</td> <td class="specialhead2"><nobr>% Change</nobr></td> <td class="specialhead2"><nobr>Last Ex-date </nobr></td> <td class="specialhead2">Last<br> Corporate Action</td> </tr> <tr> <td class="t0"><a href="http://nseindia.com/marketinfo/equities/cmquote.jsp?key=BPCLEQN&symbol=BPCL&flag=0">BPCL</a></td> <td class="t1">320.30</td> <td class="t1">320.30</td> <td class="t1">301.10</td> <td class="t1">312.65</td> <td class="t1">302.75</td> <td class="t1">-3.17</td> <td class="t0">15-JAN-07</td> <td class="t0">INTERIM DIVIDEND - 60%</td> </tr> <tr> <td class="t0"><a href="http://nseindia.com/marketinfo/equities/cmquote.jsp?key=HCLTECHEQN&symbol=HCLTECH&flag=0">HCLTECH</a></td> <td class="t1">300.40</td> <td class="t1">302.80</td> <td class="t1">284.00</td> <td class="t1">300.40</td> <td class="t1">291.40</td> <td class="t1">-3.00</td> <td class="t0">15-MAR-07</td> <td class="t0">BONUS 1:1</td> </tr> <tr> <td class="t0"><a href="http://nseindia.com/marketinfo/equities/cmquote.jsp?key=JETAIRWAYSEQN&symbol=JETAIRWAYS&flag=0">JETAIRWAYS</a></td> <td class="t1">647.35</td> <td class="t1">663.00</td> <td class="t1">628.00</td> <td class="t1">650.15</td> <td class="t1">633.20</td> <td class="t1">-2.61</td> <td class="t0">07-SEP-06</td> <td class="t0">AGM/DIV-RS.6/- PER SH</td> </tr> <tr> <td class="t0"><a href="http://nseindia.com/marketinfo/equities/cmquote.jsp?key=HDFCEQN&symbol=HDFC&flag=0">HDFC</a></td> <td class="t1">1535.90</td> <td class="t1">1539.95</td> <td class="t1">1501.25</td> <td class="t1">1537.85</td> <td class="t1">1519.80</td> <td class="t1">-1.17</td> <td class="t0">30-JUN-06</td> <td class="t0">AGM/DIV-RS.20/- PER SH</td> </tr> <tr> <td class="t0"><a href="http://nseindia.com/marketinfo/equities/cmquote.jsp?key=TCSEQN&symbol=TCS&flag=0">TCS</a></td> <td class="t1">1248.35</td> <td class="t1">1254.80</td> <td class="t1">1220.25</td> <td class="t1">1248.35</td> <td class="t1">1233.85</td> <td class="t1">-1.16</td> <td class="t0">22-JAN-07</td> <td class="t0">3RD INT DIV-RS.3/- PER SHPURPOSE REVISED</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </td> </tr> <!-- <tr><td colspan=3 class=smalllinks><ul><li>% change is w.r.t. Prev. Close</li><li>If today is Ex-Date, % change is w.r.t. Open Price</li></ul></td></tr> --> </table> </body> </html>
You want to strip out the HTML of the code above, create a flat file of it, and then save it into a database? So you'll have the flat file and the database entry? And how do you want to strip the tags? It's gonna look weird the text without HTML. Do you want a specific part of this HTML code?
Okay, now please use full sentences, and explain very detailed what exactly you want to do. And answer all my questions above. I can not guess what you want to do. EDIT: Okay, after some thinking, maybe I get what you mean.
can u have a look at the html file made by this code. I want the table which contains 51 rows in csv format(ie i save the required data as file.csv). now the format of the data should be data in cell,data in cell,data in cell; "," seperates the data in the table ";" ends the line