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.

Revisiting Chicxulub

An artist's rendering of the moment of impact at the end of the Cretaceous.

For decades, scientists have accumulated ever-larger datasets that suggest an enormous space rock crashed into the ocean off the Yucatan Peninsula more than 65 million years ago, resulting in the Cretaceous-Paleogene (K-Pg) extinction.

Recent research, supported in part by the National Science Foundation (NSF), suggested that the impact could have occurred 300,000 years prior to the K-Pg extinction, and that another cause--perhaps a second impact, or the long-lasting volcanic activity ...

More at http://www.nsf.gov/news/news_summ.jsp?cntn_id=116480&WT.mc_id=USNSF_51&WT.mc_ev=click


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.