this is what creates the array -
Code:
preg_match_all("/(\d\d\:\d\d)[\s]*(.*)[\s]*(.*((?![\s]*\d\d\:\d\d)(?![\s]{3})[\s]*.*)*)/", $strippedhtmldoc, $myarray);
but it's not too important how it gets there. it is there that's the main thing.
when i print the whole thing out it's all there like this...
Code:
// more php above here
foreach($myarray[1] as $key => $val) {
?>
<textarea rows="1" cols="10"><?php print $myarray[1][$key]; ?></textarea>
<textarea rows="2" cols="20"><?php print $myarray[2][$key]; ?></textarea>
<textarea rows="10" cols="50"><?php print $myarray[3][$key]; ?></textarea> <br>
<?php
}
?>
...no problem. there's 38 rows. the above print out prints 3 elements per row because that's all it's asking but there seems to be another element per row in the [0] position - the pregmatchall seems to have made a grouping of the three other elements in [1] [2] and [3] in the [0] box. maybe that's a standard feature of pregmatchall, or maybe the pregmatch that i'm using requests that but i don't think it does. inanycase, not important.
the main thing i want to be able to ask in my code is how many rows? an d the answer would be in this particular situation 37 or 38 depending on whether you start from 0 or 1
also i'd like to be able to ask how many elements does each row have?
there must be a direct simple way to get that isn't there?
Bookmarks