P3) Separating Elements of a 2 * 3
table
Write a function that receives a string that is the HTML code of
a 2*3 table (table might have a header or not have one) and then
separates all the 2*3 elements in the table and returns them as an
array 1*6.
For example if we submit the following table as the string
input:
"<table style="width:100%">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>"
The output should be the
the arrray {"Jill", "Smith", "50", "Eve", "Jackson", "4"}
please use PHP code for the problem, post the details
and result on the below. Thank you.
P3) Separating Elements of a 2 * 3 table Write a function that receives a string that is the HTML code of a 2*3 table (t
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am