SWFObject 2.0 (static) example: Passing querystring variables to a SWF using PHP

Please update your Flash Player

The following PHP code is being used to get the querystring terms and dynamically add them to the SWF's flashvars param:

   <?php
   $flashvars = "";
   foreach($_GET as $variable => $value) {
      $flashvars .= $variable . "=" . $value . "&";
   }
   //Get rid of the last ampersand
   $flashvars = rtrim($flashvars, "&");
   ?>
    <param name="flashvars" value="<?php echo $flashvars ?>" />

Click one of these links to populate the querystring: