Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts

    ASP functions to PHP?

    is there anyway I can make these ASP functions into PHP functions and how would i use them?

    Code:
    Function EncodeSQL(VarVal)
    	EncodeSQL=Replace(VarVal,"'","`")
    End Function
    
    Function DecodeSQL(VarVal)
    	DecodeSQL=Replace(VarVal,"`","'")
    End Function

  • #2
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,046
    Thanks
    19
    Thanked 42 Times in 42 Posts
    PHP Code:

    function encode_stuff($str){

    $str1 str_replace("'""`",$Str);
    return 
    $str1;


    Hope this solves your problem.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •