Another way that can be used is
$query = "SELECT * FROM table WHERE column = '{$string}';";
putting the braces ("{", "}") around the variable is a good way of writing especially if you are going to use an array var as in the following example
$query = "SELECT * FROM table WHERE column = '{$array['string']}';"
notice that between the square brackets is another set of single quotation (" ' ") but this does not affect the rest of the string as it would when doing it like "... WHERE column = '$array['string']';";
Hope it helps