 <p>if string is: <code>$str = '"World"';</code></p> <p><code>ltrim()</code> function will remove only first Double quote.</p> <p>Output: <code>World"</code></p> <p>So instead of using both these function you should use <code>trim()</code>. Example:</p> <pre><code>$str = '"World"'; echo trim($str, '"'); </code></pre> <p>Output-</p> <pre><code>World </code></pre>