ID:               46027
 Updated by:       [EMAIL PROTECTED]
 Reported By:      thebeanieman at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Output Control
 Operating System: Windows XP SP3
 PHP Version:      5.2.6
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:
------------------------------------------------------------------------

[2008-09-09 03:13:27] thebeanieman at gmail dot com

Description:
------------
Hi,

This is my code:

<?php

  $chemString = "H2O,3PO4.12WO3.XH2O,6H4(CH3)2,5H10O5";
  $chemString = trim($chemString);
  $offset = 0;
  $tempStr = "";

  for ($k=0;$k<mb_strlen($chemString);$k++){
      if ($k>0 && is_numeric(mb_substr($chemString,$k,1))){
          if (preg_match("/^[A-Z]+$/",mb_substr($chemString,$k-1,1))){
             $tempStr .= substr($chemString,$offset,1);
             $tempStr .=
"<sub>".substr($chemString,$offset+1,1)."</sub>";
             $offset = $offset+3;
             echo "ggg".strlen($offset)."sss<br />";
          }
      }
        echo "<br />".$k;
  }

?>

This is the source:

<br />0ggg1sss<br /><br />1<br />2<br />3<br />4<br />5<br
/>6ggg1sss<br /><br />7<br />8<br />9<br />10<br />11<br />12ggg1sss<br
/><br />13<br />14<br />15<br />16ggg2sss<br /><br />17<br />18<br
/>19<br />20<br />21ggg2sss<br /><br />22<br />23<br />24<br
/>25ggg2sss<br /><br />26<br />27<br />28<br />29<br />30<br
/>31ggg2sss<br /><br />32<br />33<br />34ggg2sss<br /><br />35

Expected result:
----------------
There is an extra <br /> tag. I know it's hard to see, but looks like a
bug.


i.e "<br />0ggg1sss<br /><br />1<br />"  --- the <br /> in the middle
came from nowhere!!



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=46027&edit=1

Reply via email to