ID:               44427
 User updated by:  garichner at i2pmail dot org
 Reported By:      garichner at i2pmail dot org
-Status:           Feedback
+Status:           Closed
 Bug Type:         Strings related
 Operating System: S.u.S.E. 10.3
 PHP Version:      5.2.5
 New Comment:

foreach ($buffer_Infile1 as $VAL1) {
                foreach ($VAL1 as $VAL2){
                    $VAL2=trim($VAL2);
                    $POSP=stripos($VAL2,".");//<<<<<<<<
                    echo $VAL2." ".$POSP."\n";
                }

this is the output 

s.schaefer 1
sschaefer

solved


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

[2008-03-13 11:54:47] [EMAIL PROTECTED]

Please provide a short but _complete_ reproducing script. (one that
starts with <?php, ends with ?> and can be simply copy'n'pasted to run.

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

[2008-03-13 10:31:19] garichner at i2pmail dot org

Description:
------------
stripos strpos don't do false on needle not found

foreach ($buffer_Infile1 as $VAL1) {
                foreach ($VAL1 as $VAL2){
                    $VAL2=trim($VAL2);
                    $POSP=stripos($VAL1[0],".");
                    echo $VAL2." ".$POSP."\n";
                }
does this

s.schaefer 1
sschaefer 1

but should to this

s.schaefer 1
sschaefer 0


Reproduce code:
---------------
foreach ($buffer_Infile1 as $VAL1) {
                foreach ($VAL1 as $VAL2){
                    $VAL2=trim($VAL2);
                    $POSP=stripos($VAL1[0],".");
                    echo $VAL2." ".$POSP."\n";
                }

Expected result:
----------------
s.schaefer 1
sschaefer 0

Actual result:
--------------
s.schaefer 1
sschaefer 1


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


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

Reply via email to