# get raw html table

I have table(s) whose contents can be

[php]

 1004 QUES The first 5 terms of a sequence are -18, -12, -6, 0, 6. If this an AP find 10th term: Q Given: For a sequence, t1 = -18, t2 = -12, t3 = -6, t4 = 0, t5 = 6 AS1 To Find: Whether the sequence is an AP. If so, the 10th term i.e. t10. AS2 Solution: For the given sequence, AS3 t2 - t1 = -12 - (-18) = -12 +18 From given AS4 ∴ t2 - t1 = 6 ….(1) AS5 t3 - t2 = -6 - (-12) = -6 + 12 From given AS6 ∴ t3 - t2 = 6 ….(2) AS7 t4 - t3 = 0 - (-6) = 0 + 6 From given AS8 ∴ t4 - t3 = 6 ….(3) AS9 t5 - t4 = 6 - 0 = 6 ….(4) AS10 ∴ t2 - t1 = t3 - t2 = t4 - t3 = t5 - t4 = 6 from (1), (2), (3), (4) AS11 ∴ The difference between the consecutive terms is constant AS12 ∴ The given sequence is an AP with AS13 the first term = a = -18 and common difference = d = 6 ….(5) AS14 Now For an AP, tn = a + (n - 1) d AS15 ∴ t10 = -18 + (10 - 1)(6) Substituting values AS16 ∴ t10 = -18 + (9)(6) AS17 ∴ t10 = -18 + 54 AS18
[/php]

I want to remove elements like

height=“21” style=“height:15.75pt”

so that I will get table raw table
having

 some information 1 some information 2 some information 3 some information 4

In other words

I want only

How is this a php issue? or did i not understand the question?

Dear All

Yes this is PHP .
Something to do with php

A command

helps to retrieve data between and

how do i get only (remove the data between these two tags)

I need to do this using php because data from excel is cut and pasted into text area

and looks like
[php]

 1004 QUES The first 5 terms of a sequence are -18, -12, -6, 0, 6. If this an AP find 10th term: Q Given: For a sequence, t1 = -18, t2 = -12, t3 = -6, t4 = 0, t5 = 6 AS1 To Find: Whether the sequence is an AP. If so, the 10th term i.e. t10. AS2 Solution: For the given sequence, AS3 t2 - t1 = -12 - (-18) = -12 +18 From given AS4 ∴ t2 - t1 = 6 ….(1) AS5 t3 - t2 = -6 - (-12) = -6 + 12 From given AS6
' [/php]

I know there are solutions to make csv and then upload but here data is ready in database (cut and pasted from excel file

What I want to achieve is

Seperate all rows and columns
and store them in a database table
every html row in database table row
and every chtml table column in database table column

Dear All

using following commands i could remove text/data between

and text/data after "<table ........

\$cat = preg_replace(’/<tr.>/’, " ", \$data);
\$cat1 = preg_replace(’/<table.>/’, "

", \$cat);

However

I want to seperate all data between

and store them in array

pls help

 data1

Dear All

done

using following code

\$str1 = preg_replace(’/height.*?>/’, '> ', \$data);
echo “

str1 after replace”.htmlentities(\$str1);

\$str1 = preg_replace(’/width.*?>/’, '> ', \$str1);
echo “

str1 after replac width e”.htmlentities(\$str1);

I just want to mention this can easily be done using PHP’s built in XML functions. If I have time I will post an example on Monday.

Dear m@tt

Thanks
after lot of R&D I could clean up html table

The table is
[php]\$html=’

5 ';

\$trstr = preg_replace(’/<tr.?>(.?)</tr>/s’, ‘\$2’, \$html);
echo htmlentities(\$trstr);[/php]

this removes

but i want to store each row in separate array

pls help

 1004 QUES The first 5 terms of a sequence are -18, -12, -6, 0, 6. If this an AP find 10th term: Q 1005 QUES5555555 The 555555555555 5 terms of a sequence are -18, -12, -6, 0, 6. If this an AP find 10th term: Q