HTML to PHP converter tutorial

Discussion in 'PHP' started by 501, Apr 2, 2007.

  1. #1
    This is a simple tutorial that teaches you how to create a html to php converter using PHP.

    This is the function to perform the conversion

    function htmltophp($input){
    if($input != "" && is_string($input)){
    $inputarray = explode("\r\n", $input);
    $output = "";
    foreach($inputarray as $line){
    $output .= "echo \"".addslashes($line)."\";\n";
    }
    return $output;
    }
    else{return $input;}
    } 
    PHP:
    To view more of this tutorial please click here:

    HTML to PHP converter tutorial

    Cheers
     
    501, Apr 2, 2007 IP
  2. manilodisan

    manilodisan Peon

    Messages:
    224
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Is this the new way of spam? Did someone asked for something like this?
     
    manilodisan, Apr 2, 2007 IP