ID:               49487
 Updated by:       scott...@php.net
 Reported By:      shefik at allknightaccess dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Feature/Change Request
 Operating System: Mac 10.5.8
 PHP Version:      5.3.0
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

We have this with addcslashes where you can provide a character list to
escape.


Previous Comments:
------------------------------------------------------------------------

[2009-09-06 19:44:49] shefik at allknightaccess dot com

Description:
------------
Please add a new parameter for the function addslashes, where it flags

what type of character to quote string with slashes.

Such as:

SINGLE
DOUBLE
BACKSLASH
NULL
ALL

All would remain the default, as it is right now. Example use with the

new parameter:

<?php
$str = "He asked, \"Is your name O'reilly?\"";

// Outputs: He asked, "Is your name O\'reilly?"
echo addslashes($str, SINGLE);
?>

<?php
$str = "He asked, \"Is your name O'reilly?\"";

// Outputs: He asked, \"Is your name O'reilly?\"
echo addslashes($str, DOUBLE);
?>


<?php
$str = "He asked, \"Is your name O'reilly?\"";

// Outputs: He asked, \"Is your name O\'reilly?\"
echo addslashes($str, ALL);
?>




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49487&edit=1

Reply via email to