I am trying to write a script that will reformat some HTML code. Say I have 10 table rows in a file:
<tr>
<td>row 1</td>
</tr>
<tr>
<td>row 2</td>
</tr>
etc...
I read in this file as a variable in my script and I'm trying to create an array with each row being a separate element, so that I can manipulate only the odd numbered rows. I am using split() to create the array:
$file = fopen("table_rows.html", "r")
$rows = fread($file, 100000);
$rows = split("</tr>", $uncolored_rows);
How do I access these array elements? Currently it just echos the word "Array".