Languages

Fsharp
ActionScript
xBase
Clean
GPSS
PureBasic
Sieve
Erlang
JOVIAL
Mercury
Linda
DataFlex
PostScript
FoxPro2
VFP
Cobol
Prolog
Jython
Awk
VisualBasic
JavaScript
Matlab
ASP
Haskell
Csharp
D
Smalltalk
Nemerle
Pixilang
Java
SQL
Python
ObjectPascal
Ruby
Perl
Pascal
Assembler
PHP
C
Functions  Add function  Users  Registration  Enter   About  ASCII Table  Our helpers

strrpos in PHP

(PHP 4, PHP 5)

strrpos — Find position of last occurrence of a char in a string
Description
int strrpos ( string $haystack, string $needle [, int $offset] )

Returns the numeric position of the last occurrence of needle in the haystack string. Note that the needle in this case can only be a single character in PHP 4. If a string is passed as the needle, then only the first character of that string will be used.

If needle is not found, returns FALSE.

It is easy to mistake the return values for "character found at position 0" and "character not found". Here's how to detect the difference:

<?php

// in PHP 4.0.0 and newer:
$pos = strrpos($mystring, "b");
if ($pos === false) { // note: three equal signs
// not found...
}

// in versions older than 4.0.0:
$pos = strrpos($mystring, "b");
if (is_bool($pos) && !$pos) {
// not found...
}
?>

If needle is not a string, it is converted to an integer and applied as the ordinal value of a character.

Note: As of PHP 5.0.0 offset may be specified to begin searching an arbitrary number of characters into the string. Negative values will stop searching at an arbitrary point prior to the end of the string.

Note: The needle may be a string of more than one character as of PHP 5.0.0.
Doing for this function is string
Add by Pancho
You can edit it here
abcarticle.ru (blockart[dog]mail[dot]ru)
HB7A9j <a href="http://fpfjigaqteth.com/">fpfjigaqteth</a>, [url=http://fotrkgzvjtvh.com/]fotrkgzvjtvh[/url], [link=http://rakzhbotnshd.com/]rakzhbotnshd[/link], http://epjhskqvhvrh.com/
abcarticle.ru (blockart[dog]mail[dot]ru)
ZeE5GG <a href="http://czhdrzrfhyvx.com/">czhdrzrfhyvx</a>, [url=http://vplgxrnngpma.com/]vplgxrnngpma[/url], [link=http://vvnbdcbsdbpf.com/]vvnbdcbsdbpf[/link], http://lqatkuktwhne.com/
Adding comments is available only for registered users.

Citizen Science

eggs in a nest Volunteers help scientists understand birds and changing habitats

Full story at http://www.nsf.gov/news/special_reports/science_nation/citizenscience.jsp?WT.mc_id=USNSF_51


This is an NSF News item.

PycckaR
BepcuR


Articles
Articles


Library
Library


Downloads
Downloads

Google Chrome Golf 6
 © Internet, books, teachers and Rudevich Alexander brains.