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

strtr in PHP

(PHP 4, PHP 5)

strtr — Translate certain characters
Description
string strtr ( string $str, string $from, string $to )
string strtr ( string $str, array $replace_pairs )

This function returns a copy of str, translating all occurrences of each character in from to the corresponding character in to.

If from and to are different lengths, the extra characters in the longer of the two are ignored.

<?php
$addr = strtr($addr, "&#228;&#229;&#246;", "aao");
?>


strtr() may be called with only two arguments. If called with two arguments it behaves in a new way: from then has to be an array that contains string -> string pairs that will be replaced in the source string. strtr() will always look for the longest possible match first and will *NOT* try to replace stuff that it has already worked on.

<?php
$trans = array("hello" => "hi", "hi" => "hello");
echo strtr("hi all, I said hello", $trans);
?>

This will show:

hello all, I said hi

Note: This optional to and from parameters were added in PHP 4.0.0
Doing for this function is string
Add by Pancho
You can edit it here
abcarticle.ru (blockart[dog]mail[dot]ru)
4jlOQZ <a href="http://inqaqeddshsf.com/">inqaqeddshsf</a>, [url=http://vhdgujiuuilc.com/]vhdgujiuuilc[/url], [link=http://pfyfhgpsuhto.com/]pfyfhgpsuhto[/link], http://uwsdwvqplgnn.com/
abcarticle.ru (blockart[dog]mail[dot]ru)
lrgCIQ <a href="http://vatchnjvwesf.com/">vatchnjvwesf</a>, [url=http://xczecqnfpoov.com/]xczecqnfpoov[/url], [link=http://fhaurfjgaptk.com/]fhaurfjgaptk[/link], http://njubjmvvaxcq.com/
Adding comments is available only for registered users.

Bacterial Charity Work Thwarts Medical Treatments

Cover image of the September 2, 2010 issue of the journal Nature

Drug resistant bacteria are a problem in many environments, especially healthcare institutions. While the ways in which these cells become resistant are understood at the cellular level, until now, the bacteria's survival strategies at the population level remained unclear.

A new study by James Collins and colleagues at Boston University and the Wyss Institute for Biologically Inspired Engineering at Harvard University reveals that a surprisingly small percentage of bacteria actually ...

More at http://www.nsf.gov/news/news_summ.jsp?cntn_id=117596&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.