Home N-13 News Forums Help Search
RegisterForgot password?
Login with facebook , twitter and google account aningbo
I have the following error at the top of the page how to fix it Rayc

Latest N-13 News 4.0.2

What is N-13 News?
Where can I get help?

Forums Tutorials SEO friendly URL string using CakePHP
Chris
Posted on 13 Jan 2012, 06:36:58

Access: Admin
Total Posts: 1349
Joined: 2006-05-19

CakePHP's built in Inflector class comes with a few handy methods, one of which is the slug method that lets you convert strings to SEO friendly URLs. The first parameter is the string to convert, the second is the delimiter used to separate each word.

<?php
$str = "This is the string I want to convert";
echo Inflector::slug($str, '-');
?>

Outputs

This-is-the-string-I-want-to-convert

#3684
Last edited by Chris at 2012-01-13 18:37:55 Reason: .
Network-13.com © 2011