I'm trying to open a file where the ending of it looks something like this:
<tags/>
<workout><Warmup Duration="300" PowerHigh="0.5" PowerLow="0.4"></Warmup>
<SteadyState Duration="300" Power="0.65"></SteadyState>
<SteadyState Duration="30" Power="0.65"></SteadyState>
<SteadyState Duration="570" Power="0.85"></SteadyState>
</workout>
</workout_file>
But that part isn't read when importing it. Tried several different solutions. Ideally I'd like it to show up as:
300 seconds at 0.65.
30 seconds at 0.65.
570 seconds at 0.85.
I have tried reading the entire text file, but it doesn't read the parts after <tags'/> and I've also tried preg_match to get the text inside the workout elements.
$text1 = file_get_contents("workoutfile.zwo");
preg_match("'<workout>(.*?).</workout>'si", $text1, $wotext);
print_r($wotext[0]);