Tag: addcslashes

what is addcslashes() in php?

April 11, 2010 | Filed Under PHP | Comments Off

addcslashes — Quote string with slashes in a C style

style="color: #0000bb;"><?php
addcslashes('foo[ ]', 'A..z');
// output:  \f\o\o\[ \]
// All upper and lower-case letters will be escaped
// ... but so will the [\]^_` and any tabs, line
// feeds, carriage returns, etc.
style="color: #0000bb;">?>
<?php
echo addcslashes("zoo['.']", 'z..A');
// output:  \zoo['\.']
?>
Article written by admin

© PHPInterviewQuestion.com 2009 - 2012

eXTReMe Tracker