I haven’t had a whole lot to blog about lately as I have been stuck doing some Java work that won’t ever really see the light of day (as far as the to the public), so I decided to start posting some of my commonly used PHP functions. I use this function urldecodeObject() along with the mysql_fetch_object() when I’m fetching urlencoded data from a mysql database. This makes it easier than typing urldecode($obj_name->property) every time I need to access/output a property.
-
function urldecodeObject($obj)
-
{
-
foreach($obj as $key=>$prop)
-
{
-
}
-
return $obj;
-
}