This is a simple, but very handy function when working with PHP and Flash. This will turn an object into a string of URL data – this is very helpful converting a mySQL object from mysql_fetch_object to Flash variables.
-
function object2URLData($obj)
-
{
-
$data = "";
-
foreach($obj as $key=>$prop)
-
{
-
if($data != ""){ $data .= "&"; }
-
$data .= "$key=$prop";
-
}
-
return $data;
-
}