I'm wondering why php adds a backslash when i remove double quotes.
<input type="text" name="number" id="number" />
<input type="button" name="button" id="button" value="Button" />
Say they user enters the value 5-1/2" and i'm passing it to a processing page via jquery's .get method.
$('#button').click(function(){
$.get('determine.php?number='+$('#number').val(),function(data){
$('#response').html(data);
});
});
Here is my processing page.
determine.php
$number = $_GET['number'];
$number = str_replace(array('"', "'"), '', $number);
echo $number;
//echos 5-1/2\
Why is the backslash there?