Czy jest jakaś funkcia ktora potrafi przystosować ciag znakow do zastosowania go w linku?
Chodzi mi o zamienienie znaków spacji na _ oraz usuniecie polskich znaków oraz innych niedozwolonych znakow takich jak np. ""?*$% i innch
<?php /** * Code Igniter * * An open source application development framework for php 4.3.2 or newer * * @package CodeIgniter * @author Rick Ellis * @copyright Copyright (c) 2006, pMachine, Inc. * @license <a href="http://www.codeignitor.com/user_guide/license.html" target="_blank">http://www.codeignitor.com/user_guide/license.html</a> * @link <a href="http://www.codeigniter.com" target="_blank">http://www.codeigniter.com</a> * @since Version 1.0 * @filesource */ /** * Create URL Title * * Takes a "title" string as input and creates a * human-friendly URL string with either a dash * or an underscore as the word separator. * * @access public * @param string the string * @param string the separator: dash, or underscore * @return string */ function url_title($str, $separator = 'dash') { if ($separator == 'dash') { $search = '_'; $replace = '-'; } else { $search = '-'; $replace = '_'; } $search => $replace, "s+" => $replace, "[^a-z0-9".$replace."]" => '', $replace."+" => $replace, $replace."$" => '', "^".$replace => '' ); foreach ($trans as $key => $val) { } } ?>