n> <span class="nv">$data</span><span class="p">);</span>
<span class="p">}</span>
</pre></div>
</div>
<p>This new method takes care of inserting the news item into the database.
The third line contains a new function, url_title(). This function -
provided by the <a class="reference internal" href="../helpers/url_helper.html"><em>URL helper</em></a> - strips down
the string you pass it, replacing all spaces by dashes (-) and makes
sure everything is in lowercase characters. This leaves you with a nice
slug,