• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
uri_segment and characters substitution

#1
[eluser]itibook[/eluser]
Hi all,

as always, sorry if this looks silly. I did search for a while, but did not find anything similar.

I have a uri_segment like the following:

my-title-1.1-is-ok

(this could be a blog post title for example)

the uri was generated via the url_title() function, so nothing funny there.

The issue is that when I try to match uri_segment with the database title I do as follows:

Code:
if(uri_segment(x) == url_title(my-db-title))

The match fails and is caused by the "." characters being substituted with a "_" in the uri_segment function.

Basically the uri_segment gives me this:

Code:
uri_segment(x) -> my-title-1_1-is-ok

while url_title give me this:

Code:
url_title('my title 1.1 is ok') ->  my-title-1.1-is-ok

I am really a bit lost at this... I am sure I am missing something easy, but as I am starting this is not that obvious at the moment... :-)

thanks in advance

Luca


Messages In This Thread
uri_segment and characters substitution - by El Forum - 09-19-2009, 04:01 PM
uri_segment and characters substitution - by El Forum - 09-19-2009, 10:09 PM
uri_segment and characters substitution - by El Forum - 09-20-2009, 01:51 AM
uri_segment and characters substitution - by El Forum - 09-20-2009, 02:39 AM
uri_segment and characters substitution - by El Forum - 09-20-2009, 04:10 AM
uri_segment and characters substitution - by El Forum - 09-21-2009, 12:13 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.