You are here: strpos question « PHP Programming Language « IT news, forums, messages
strpos question

Posted by drec on 10/30/66 11:51

I am trying to right an if statment using strpos to determine if the
string exists in the variable, however I seem to be getting the wrong
effect. Here is my script.

<?php
$dn = "ABC-DEF";

$pos = strpos( $dn, "ABC-DEF" );
if ( $pos != FALSE )
{
echo 'variable contains value';
}
else
{
echo ' variable does not contain value' ;
}
?>

It keeps returning does not contain value. I am kinda new to strpos,
any suggestions?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация