communication
 databases
 directories
 file handling
 html and code
 image editing
 image listing
 sessions and co
 string handling
 information
 forms
 apple stuff
 image handling
 array handling
 lixlpixel
php - snippets
google search terms detected and highlighted.
remove highlighting | keep highlighting
make snippet in "string handling" - download "swear"
 search
php - snippets

Valid CSS!

php webring logo
prev next
random list
join the Ring!

string handling - swear was created/last modified on Tue 15 Nov 2005 11:34 AM

<?php
function encode_text($html_code){

$from = array('"',"'",'ficken','bumsen');
$to = array('"',"\'",'nasenbeissen','jodeln');
     
while(
$row = mysql_fetch_array($result)){
     
$i++;
     if(
$i+1<$ic){
         
array_push($from, "$row[1]");
         
array_push($to, "$row[2]");
     }
}

$html_code = str_replace($from, $to, $html_code);
     return
$html_code;
}
?>

learn more about some of the PHP functions used in this snippet: array, array_push, function, mysql, mysql_fetch_array, return, str_replace, while

view the GNU general license - view the GNU library license - search on PHPsnippets - see your code like this

 a lixlpixel.com site

PHParadise.com - PHP-classes.org - your site on safari