<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Quote meta characters</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.quoted-printable-encode.html">quoted_printable_encode</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.rtrim.html">rtrim</a></div> <div class="up"><a href="ref.strings.html">String Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.quotemeta" class="refentry"> <div class="refnamediv"> <h1 class="refname">quotemeta</h1> <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">quotemeta</span> — <span class="dc-title">Quote meta characters</span></p> </div> <div class="refsect1 description" id="refsect1-function.quotemeta-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">string</span> <span class="methodname"><strong>quotemeta</strong></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$str</code></span> )</div> <p class="para rdfs-comment"> Returns a version of str with a backslash character (<em>\</em>) before every character that is among these: <div class="example-contents screen">. \ + * ? [ ^ ] ( $ )</div> </p> </div> <div class="refsect1 parameters" id="refsect1-function.quotemeta-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">str</code></em></span> <dd> <p class="para"> The input string. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.quotemeta-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns the string with meta characters quoted, or <strong><code>FALSE</code></strong> if an empty string is given as <em><code class="parameter">str</code></em>. </p> </div> <div class="refsect1 notes" id="refsect1-function.quotemeta-notes"> <h3 class="title">Notes</h3> <blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara">This function is binary-safe.</span></p></blockquote> </div> <div class="refsect1 seealso" id="refsect1-function.quotemeta-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><a href="function.addslashes.html" class="function" rel="rdfs-seeAlso">addslashes()</a> - Quote string with slashes</span></li> <li class="member"> <span class="function"><a href="function.addcslashes.html" class="function" rel="rdfs-seeAlso">addcslashes()</a> - Quote string with slashes in a C style</span></li> <li class="member"> <span class="function"><a href="function.htmlentities.html" class="function" rel="rdfs-seeAlso">htmlentities()</a> - Convert all applicable characters to HTML entities</span></li> <li class="member"> <span class="function"><a href="function.htmlspecialchars.html" class="function" rel="rdfs-seeAlso">htmlspecialchars()</a> - Convert special characters to HTML entities</span></li> <li class="member"> <span class="function"><a href="function.nl2br.html" class="function" rel="rdfs-seeAlso">nl2br()</a> - Inserts HTML line breaks before all newlines in a string</span></li> <li class="member"> <span class="function"><a href="function.stripslashes.html" class="function" rel="rdfs-seeAlso">stripslashes()</a> - Un-quotes a quoted string</span></li> <li class="member"> <span class="function"><a href="function.stripcslashes.html" class="function" rel="rdfs-seeAlso">stripcslashes()</a> - Un-quote string quoted with addcslashes</span></li> <li class="member"> <span class="function"><a href="function.ereg.html" class="function" rel="rdfs-seeAlso">ereg()</a> - Regular expression match</span></li> <li class="member"> <span class="function"><a href="function.preg-quote.html" class="function" rel="rdfs-seeAlso">preg_quote()</a> - Quote regular expression characters</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.quoted-printable-encode.html">quoted_printable_encode</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.rtrim.html">rtrim</a></div> <div class="up"><a href="ref.strings.html">String Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>