List of Examples
 

How to use replace example?


Chars replace


Word replace


Line replace


Paragraph replace


Extracting useful text


Sort function


Creating report from text file


Word frequency statistics


Using dictionary


Begin and End text


Binary/Octet/Decimal/Hex Conversion


Date, Time and Timezone Conversion


Html/Text/Link Conversion


Batch Command Generator


Input and output: Overwrite/Append/Column Append


Input and output: File Join and Split


Input and output: Output file name control


Input and output: Use DOS Command and WWW Pages as input


Input and output: Encoding and UNIX format converting


Example of Regular Expression(RE)


Example of Range Definitions


Example of Using user defined Macros


Random


String Encoding/Decoding


Misc ...

', '>',$fString); $fString = str_replace( '<', '<',$fString); $fString = str_replace( chr(32), ' ',$fString); $fString = str_replace( chr(13), ' ',$fString); $fString = str_replace( chr(10) & chr(10), '
',$fString); $fString = str_replace( chr(10), '
',$fString); // $fString = str_replace( '
``', '
',$fString); // $fString = str_replace( '
``', '
',$fString); // $fString = str_replace( '``
', '
',$fString); // $fString = str_replace( '``
', '
',$fString); $fString = eregi_replace("http://([^ ,\r\n]*)","\\0",$fString); } return $fString; } function HtmlEncode($fstring) { $result=''; $arrstring=split('``',$fstring); for($i=0;$i40) { $col+=5; } if ($col>200) { $col=200; } $result.=''; } else { $result.=HtmlEncodeBasic($arrstring[$i]); } } return $result; } function HtmlEncode1($fString) { if($fString!="") { $fString = str_replace( '>', '>',$fString); $fString = str_replace( '<', '<',$fString); //$fString = str_replace( chr(32), ' ',$fString); $fString = str_replace( chr(13), ' ',$fString); $fString = str_replace( chr(10) & chr(10), '
',$fString); $fString = str_replace( chr(10), '
',$fString); } return $fString; } $filename=$_GET['filename']; if (!isset($filename)) { exit; } $mon="m".(date("m")%3); $mon1="m".((date("m")+1)%3); $dbid = mysql_connect($hostname,$dbuser,$dbpasswd) or die(""); $db = mysql_select_db("mindp9_test",$dbid) or die(""); $query = "update help_content set hits=hits+1,$mon=$mon+1,$mon1=0 where filename = \"$filename\""; $rresult = mysql_query($query) or die("SQL: no record found."); $query = "select keywords from help_content where filename = \"$filename\""; $rresult = mysql_query($query) or die("SQL: no record found."); $arr= mysql_fetch_row($rresult); $keywords=preg_replace('/\|/',',',$arr[0]); echo "

"; echo "
"; $key_arr=explode(",",$keywords); for($i=0;$iKeywords:

"; } if ($key_arr[$i]!= "")echo "$key_arr[$i]  "; #if ($i==10) { echo "
"; } } ?>
Search online help: