Welcome Guest, Not a member yet? Register   Sign In
A more-useful uri_to_assoc
#18

[eluser]xwero[/eluser]
I recognize there could be problems but i still believe the percentage is minimal even with user input. Benjamin's example made it a little clearer but having a category tags and being able to add tags as a keyword still is far fetched IMO. Why should a visitor use forward slashes in his input and why should the code depend on it, if it's not a part of the site structure?

If you are not comfortable using the segment method mod i provided you could use a method that wraps the uri_to_assoc method
Code:
function get_sim($start,$key,$not_found = false)
{
   $pseudo_get = $this->uri_to_assoc($start);

   return (isset($pseudo_get[$key])) ? $pseudo_get[$key] : $not_found ;
}
I tried to create a function that doesn't make the use of the segment methods more complex adding a get like functionality.


Messages In This Thread
A more-useful uri_to_assoc - by El Forum - 04-24-2009, 03:34 PM
A more-useful uri_to_assoc - by El Forum - 04-24-2009, 05:18 PM
A more-useful uri_to_assoc - by El Forum - 04-24-2009, 08:59 PM
A more-useful uri_to_assoc - by El Forum - 04-24-2009, 09:28 PM
A more-useful uri_to_assoc - by El Forum - 05-17-2009, 12:19 PM
A more-useful uri_to_assoc - by El Forum - 05-17-2009, 02:56 PM
A more-useful uri_to_assoc - by El Forum - 05-17-2009, 03:09 PM
A more-useful uri_to_assoc - by El Forum - 05-17-2009, 04:18 PM
A more-useful uri_to_assoc - by El Forum - 05-17-2009, 04:46 PM
A more-useful uri_to_assoc - by El Forum - 05-17-2009, 06:37 PM
A more-useful uri_to_assoc - by El Forum - 05-21-2009, 01:14 PM
A more-useful uri_to_assoc - by El Forum - 06-04-2009, 02:52 PM
A more-useful uri_to_assoc - by El Forum - 06-04-2009, 03:23 PM
A more-useful uri_to_assoc - by El Forum - 06-04-2009, 03:38 PM
A more-useful uri_to_assoc - by El Forum - 06-04-2009, 04:21 PM
A more-useful uri_to_assoc - by El Forum - 06-04-2009, 04:31 PM
A more-useful uri_to_assoc - by El Forum - 06-04-2009, 04:46 PM
A more-useful uri_to_assoc - by El Forum - 06-05-2009, 12:50 AM
A more-useful uri_to_assoc - by El Forum - 07-10-2009, 10:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB