Neo-Fringe Web Board
HomeAreasFilesFlashImagesLinksMembersMessagesPollsQuizzesLogin
 Features
Access
Files
Images
Links
Members
Messages
Polls
Quizzes
Web Board Statistics
 Editor Commands
Icons
BBCode
 About Us
Link To Us
The Author
Revision History
Privacy Policy
Terms of Service
Valid HTML 4.01

Valid CSS2

This site was made with PHP power!
 Last Member Login
Shecky
Shecky
last on 75d 13h 41m 52s ago
PREV  Example HTMLGROUND ZEROThe Planets  NEXT
Str_Replace
Testing php file archive.
Source Code Preview
<?php
// Provides: <body text='black'>
$bodytag str_replace("%body%""black""<body text='%body%'>");

// Provides: Hll Wrld f PHP
$vowels = array("a""e""i""o""u""A""E""I""O""U");
$onlyconsonants str_replace($vowels"""Hello World of PHP");

// Provides: You should eat pizza, beer, and ice cream every day
$phrase  "You should eat fruits, vegetables, and fiber every day.";
$healthy = array("fruits""vegetables""fiber");
$yummy   = array("pizza""beer""ice cream");

$newphrase str_replace($healthy$yummy$phrase);

// Use of the count parameter is available as of PHP 5.0.0
$str str_replace("ll""""good golly miss molly!"$count);
echo 
$count// 2

// Order of replacement
$str     "Line 1\nLine 2\rLine 3\r\nLine 4\n";
$order   = array("\r\n""\n""\r");
$replace '<br />';
// Processes \r\n's first so they aren't converted twice.
$newstr str_replace($order$replace$str);

// Outputs: apearpearle pear
$letters = array('a''p');
$fruit   = array('apple''pear');
$text    'a p';
$output  str_replace($letters$fruit$text);
echo 
$output;
?>

File
Click here to download file
Filenamestrreplace.php 
Size1,145 bytes (1.1 KB)
MD5 Hashe2e21cccb48c8266a02c6ad3370585dd
Est Download Time 
    Download

File Archive 2813 Info
AreaGround Zero
OwnerAppleseed
Restricted ToEveryone
CreatedFri, Oct 3rd 2008 @ 3:13:34pm
8y 207d 10h 6m 43s ago
Shareemail  facebook  yahoo  myspace  twitter  search google  digg
 
Popularity
Downloads13591
CommentsAllowed; 0 total
Approval56% 9 likes7 dislikes
9 likes, 7 dislikes

File Comments - 0 total
No additional comments allowed.
 Welcome Anonymous
Anonymous
Everyone 10+
 Get Started
 Login
 Lost Password
 New Member Registration
 Random Image
Tintin_Destination Moon_p56_Wall
Tintin_Destination Moon_p56_
Wallpaper General

 Archive 2813 Owner
Appleseed
Calgary Appleseed
2665 posts
Please enable Javascript

All content on this website is copyright of its respective creators.
Neo-Fringe WP v3.2 website engine code Copyright © 2001 - 2017 Neo-Fringe Web Systems.
This page has been viewed 14,679 times since 2008-10-03. Last viewed 9h 3m 27s ago.
Back to Top