<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML ><HEAD ><TITLE >iconv_strpos</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Manual PHP" HREF="index.html"><LINK REL="UP" TITLE="iconv Functions" HREF="ref.iconv.html"><LINK REL="PREVIOUS" TITLE="iconv_strlen" HREF="function.iconv-strlen.html"><LINK REL="NEXT" TITLE="iconv_strrpos" HREF="function.iconv-strrpos.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-2"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Manual PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.iconv-strlen.html" ACCESSKEY="P" >Înapoi</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.iconv-strrpos.html" ACCESSKEY="N" >Înainte</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.iconv-strpos" ></A >iconv_strpos</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN37188" ></A ><P > (PHP 5)</P >iconv_strpos -- Finds position of first occurrence of a needle within a haystack. </DIV ><DIV CLASS="refsect1" ><A NAME="AEN37191" ></A ><H2 >Description</H2 >int <B CLASS="methodname" >iconv_strpos</B > ( string haystack, string needle, int offset [, string charset])<BR ></BR ><P > Returns the numeric position of the first occurrence of <VAR CLASS="parameter" >needle</VAR > in <VAR CLASS="parameter" >haystack</VAR >. </P ><P > The optional <VAR CLASS="parameter" >offset</VAR > parameter specifies the position from which the search should be performed. </P ><P > If <VAR CLASS="parameter" >needle</VAR > is not found, <B CLASS="function" >iconv_strpos()</B > will return <TT CLASS="constant" ><B >FALSE</B ></TT >. </P ><DIV CLASS="warning" ><P ></P ><TABLE CLASS="warning" BORDER="1" WIDTH="100%" ><TR ><TD ALIGN="CENTER" ><B >Avertisment</B ></TD ></TR ><TR ><TD ALIGN="LEFT" ><P >Aceastã funcþie e posibil sã returneze <TT CLASS="constant" ><B >FALSE</B ></TT >, dar poate returna, de asemenea, o valoare ce poate fi evaluatã ca fiind <TT CLASS="constant" ><B >FALSE</B ></TT >, cum ar fi <VAR CLASS="literal" >0</VAR > sau "". Citeºte despre <A HREF="language.types.boolean.html" >tipul boolean</A > pentru mai multe informaþii. Te rog foloseºte <A HREF="language.operators.comparison.html" >operatorul ===</A > pentru a testa valoarea returnatã de aceastã funcþie. </P ></TD ></TR ></TABLE ></DIV ><P > If <VAR CLASS="parameter" >haystack</VAR > or <VAR CLASS="parameter" >needle</VAR > is not a string, it is converted to a string and applied as the ordinal value of a character. </P ><P > In contrast to <A HREF="function.strpos.html" ><B CLASS="function" >strpos()</B ></A >, the return value of <B CLASS="function" >iconv_strpos()</B > is the number of characters that appear before the needle, rather than the offset in bytes to the position where the needle has been found. The characters are counted on the basis of the specified character set <VAR CLASS="parameter" >charset</VAR >. </P ><P > If <VAR CLASS="parameter" >charset</VAR > parameter is omitted, <VAR CLASS="parameter" >string</VAR > are assumed to be encoded in <A HREF="ref.iconv.html#iconv.configuration" >iconv.internal_charset</A >. </P ><P > See also <A HREF="function.strpos.html" ><B CLASS="function" >strpos()</B ></A >, <A HREF="function.iconv-strrpos.html" ><B CLASS="function" >iconv_strrpos()</B ></A > and <A HREF="function.mb-strpos.html" ><B CLASS="function" >mb_strpos()</B ></A >. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.iconv-strlen.html" ACCESSKEY="P" >Înapoi</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Acasã</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.iconv-strrpos.html" ACCESSKEY="N" >Înainte</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >iconv_strlen</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.iconv.html" ACCESSKEY="U" >Sus</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >iconv_strrpos</TD ></TR ></TABLE ></DIV ></BODY ></HTML >