I\'m not sure if this is a cleaner way of writing this, but I think I don\'t have problems here:
echo 'String with "double quotes" inside';
echo "String with \"double quotes\" inside";
echo 'String with \'single quotes\' inside';
echo "String with 'single quotes' inside";
echo 'String with \'single quotes\' and "double quotes" inside';
echo "String with 'single quotes' and \"double quotes\" inside";