Join Up!
97634 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousstr_repeatstr_rot13next
Last updated: Tue, 29 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Czech | German

str_replace

(PHP 3>= 3.0.6, PHP 4 )

str_replace --  Sustitiye todas las apariciones de la aguja en el pajar por la cadena

Descripción

string str_replace ( string aguja, string cad, string pajar)

Esta función sustituye todas las apariciones de la aguja en el pajar por la cad dada. Si no precisa reglas especiales de sustitución, deberá usar siempre esta función en lugar de ereg_replace().

Ejemplo 1. Ejemplo de str_replace()

$bodytag = str_replace ("%cuerpo%", "negro", "<body text=%cuerpo%>");

Esta función tiene seguridad binaria.

Nota: str_replace() fue añadida en PHP 3.0.6, pero tuvo errores hasta el PHP 3.0.8.

Vea también ereg_replace() y strtr().

User Contributed Notes
str_replace
add a note about notes
There are no user contributed notes for this page.
previousstr_repeatstr_rot13next
Last updated: Tue, 29 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST