will someone help me translate this..
the asp one works, im trying to translate it to php.. or is there already a function to do this?
<?php
//<%
//sub strip(text,new_char)
//CONST v_include = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefdefghijklmnopqrstuvwxyz0123456789"
//DIM newtext,ch
//newtext = ""
//For i = 1 To Len(text)
// ch = Mid( text, i, 1 )
// If InStr( v_include, ch ) > 0 Then
// newtext = newtext & ch
// Else
// newtext = newtext & new_char
// End If
//Next
//Response.Write("<br>text: "&text)
//Response.Write("<br>newtext: "&newtext)
//end sub
//%>
//<%
//call strip("Clean your #$!';% room!","*")
//%>
?>
<?php
function edit_users($s,$r){
echo($s."<br>");
$ok = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefdefghijklmnopqrstuvwxyz0123456789.,"
For $i = 1 To strlen ($s);
$ch = substr($s, $i, 1)
If (substr($ok, $ch) > 0){
$n = $n & $ch
}
Else
{
$n = $n & $r
}
Next
echo($n);
}
?>
<?
$mystring =("Clean your #$!';%~,?> room!");
edit_users($mystring,"_");
?>