views:

69

answers:

0

Hi

I'm trying to get a PHP array to use in some jquery script using the qTip plugin. This is my array:

$descqtip[ ] = array('name' => ''.$name.'', 'description' => ''.$description.'');

Here is my jquery code:

<script type="text/javascript">
$(document).ready(function() {
   var description = <?php echo json_encode($descqtip)?>;

   $('#homepage_catgames h2').each(function(i){
      $(this).qtip({
         content: description
      })
   });
});
</script>

I know the above doesn't work, but i'm stuck on trying to get the description variable in each part of the array to their own individual tooltip.

Can anyone help me?

Thanks