<!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>Remove an existing ID3 tag</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.id3-get-version.html">id3_get_version</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.id3-set-tag.html">id3_set_tag</a></div> <div class="up"><a href="ref.id3.html">ID3 Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.id3-remove-tag" class="refentry"> <div class="refnamediv"> <h1 class="refname">id3_remove_tag</h1> <p class="verinfo">(PECL id3 >= 0.1)</p><p class="refpurpose"><span class="refname">id3_remove_tag</span> — <span class="dc-title">Remove an existing ID3 tag</span></p> </div> <div class="refsect1 description" id="refsect1-function.id3-remove-tag-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><strong>id3_remove_tag</strong></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span> [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$version</code><span class="initializer"> = ID3_V1_0</span></span> ] )</div> <p class="para rdfs-comment"> <span class="function"><strong>id3_remove_tag()</strong></span> is used to remove the information stored of an ID3 tag. </p> </div> <div class="refsect1 parameters" id="refsect1-function.id3-remove-tag-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">filename</code></em></span> <dd> <p class="para"> The path to the MP3 file </p> <p class="para"> Instead of a filename you may also pass a valid stream resource </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">version</code></em></span> <dd> <p class="para"> Allows you to specify the version of the tag as MP3 files may contain both, version 1.x and version 2.x tags. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.id3-remove-tag-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure. </p> </div> <div class="refsect1 examples" id="refsect1-function.id3-remove-tag-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="example-598"> <p><strong>Example #1 <span class="function"><strong>id3_remove_tag()</strong></span> example</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br />$result </span><span style="color: #007700">= </span><span style="color: #0000BB">id3_remove_tag</span><span style="color: #007700">( </span><span style="color: #DD0000">"path/to/example.mp3"</span><span style="color: #007700">, </span><span style="color: #0000BB">ID3_V1_0 </span><span style="color: #007700">);<br />if (</span><span style="color: #0000BB">$result </span><span style="color: #007700">=== </span><span style="color: #0000BB">true</span><span style="color: #007700">) {<br /> echo </span><span style="color: #DD0000">"Tag successfully removed\n"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> <div class="example-contents"><p> If the file is writable and contained a 1.0 tag, this will output: </p></div> <div class="example-contents screen"> <div class="cdata"><pre> Tag successfully removed </pre></div> </div> </div> </p> </div> <div class="refsect1 notes" id="refsect1-function.id3-remove-tag-notes"> <h3 class="title">Notes</h3> <blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara"> Currently <span class="function"><strong>id3_remove_tag()</strong></span> only supports version 1.0 and 1.1. If you choose to remove a 1.0 tag and the file contains a 1.1 tag, this tag will be removed, as v1.1 is only an extension of 1.0. </span> </p></blockquote> </div> <div class="refsect1 seealso" id="refsect1-function.id3-remove-tag-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><a href="function.id3-set-tag.html" class="function" rel="rdfs-seeAlso">id3_set_tag()</a> - Update information stored in an ID3 tag</span></li> <li class="member"> <span class="function"><a href="function.id3-get-tag.html" class="function" rel="rdfs-seeAlso">id3_get_tag()</a> - Get all information stored in an ID3 tag</span></li> <li class="member"> <span class="function"><a href="function.id3-get-version.html" class="function" rel="rdfs-seeAlso">id3_get_version()</a> - Get version of an ID3 tag</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.id3-get-version.html">id3_get_version</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.id3-set-tag.html">id3_set_tag</a></div> <div class="up"><a href="ref.id3.html">ID3 Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>