Greetings.
I have been attempting to count how many array elements are in the pattern returned to me by preg_match_all(). All I get is 1 for my effort. can someone shed a little light on my code please?
I figured I might be able to use a while statement, but like to avoid those, Which is faster, For(){}, or while(){}?
2Hawks.
########
The Code:
preg_match_all("/[0-9]+<\/td>/", $contents, $hits);
$count=count($hits);
echo "<br>Total Phrases: $count <br>";
// once we have the count we can make the below a loop.
echo "<br>1. ".$hits[0][0]." ".$phrase[0][0]."\n";
echo "<br>2. ".$hits[0][1]." ".$phrase[0][1]."\n";