how do i put a forward slash '/ ' into quotations using PHP?

lord unforgiven

New member
im trying to make a very simple tool using PHP to translate the letters numbers and symbols found on a keyboard into binary code. I was just starting when i found this problem.

}else if{($post == "\"){
echo 'the binary code of "\" = , the hex code =';
}
 
webdesigningcompany.net site can helpful you for any kind of help related with any kind of site like PHP, .NET or etc. I also use this site for my web development application's.
 
Okay, well...that's a backslash in your code, not a forward slash.

The backslash is used as an escape character in PHP; if you want to insert a backslash into a string you need to escape it:

else if ($post == "\")

You've also got an opening brace after the if keyword, which should not be there.
 
Back
Top