[PHP] Why might fclose() block?

2012-05-03 Thread Andy Theuninck
I'm currently seeing this in 5.3.10, although it's an intermittent problem I've seen earlier versions too. Occasionally I get a "maximum execution time" error when calling fclose() on a parallel port file descriptor. Code looks like this: $fp = fopen('/dev/lp0','w'); if ($fp){ fwrite($fp,$LongS

Re: [PHP] DOMElement: td vs. th

2010-03-11 Thread Andy Theuninck
sportTH'. >> } >> >> the only problem i foresee is s in your reports already having a >> class="something" set, which could mess it up. you'd need to check >> that. but in that case you can always pump the original $str to the >> DOM, and us

Re: [PHP] DOMElement: td vs. th

2010-03-11 Thread Andy Theuninck
5 PM, Rene Veerman wrote: > hmm lame bug... but you can add a classname to the s and check for that?.. > > On Thu, Mar 11, 2010 at 9:34 PM, Andy Theuninck wrote: >> I'm trying to parse a string containing an HTML table using the >> builtin DOM classes and running into an odd

[PHP] DOMElement: td vs. th

2010-03-11 Thread Andy Theuninck
I'm trying to parse a string containing an HTML table using the builtin DOM classes and running into an odd problem. Here's what I'm doing: $dom = new DOMDocument(); $dom->loadHTML($str); $tables = $dom->getElementsByTagName("table"); $rows = $tables->item(0)->getElementsByTagName('tr'); foreach($