We help IT Professionals succeed at work.
Get Started

Possible Array in PHP

MarthaJ Sayers
Last Modified: 2019-11-21
I have some data that I have extracted, stripped out unneeded characters
and I was wondering if somehow I could define the rest of it as an array.
I am using PHP v 5.6.25
The stripped out data consist of 5 rows and each row contains 7 cells.
My first thought was grab each <tr></tr> section, finding the position of first <td> and then it's corresponding ending </td> and looping thru each <td> cell.
I would save the position of the previous ending </td> so be starting point of next cycle.
But I was wondering if I could define the <td></td> cells as an array - would be a heck of alot easier to extract the data
Below is what a section looks like and it is the same thru out table.
Maybe use eplode function first to redefine as an array ??

<td >blah<br>blah blah</td>
<td >229939</td>
<td >09/06/2019</td>
<td >23.00</td>
<td >0.00</td>
<td ><br></td>
<td >23.00</td>
<td >more info</td>

Open in new window

Any thoughts would help. I can do it the long way but it would be nice to have a short cut...and more effective and efficient,
thank you...
Watch Question
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE