It is phrased as: addslashes($string_data)
Also Known As: Add Slashes
Examples:
<?php
$greeting = "Hello, I'm Billy";
print addslashes($greeting);
?>
This would output the string: Hello, I\'m Billy
<?php
$said = 'Who said "Live long and prosper"?';
print addslashes($said);
?>
This would output the string: Who said \"Live long and prosper\"?
No comments:
Post a Comment