Using Wordpress, i've got a wordpress plugin that card inserts a playable MP3 around the page.

To call that, together with the track particulars, this code is placed

            <?php if (function_exists("insert_audio_player")) {  
              insert_audio_player("[audio:http://thewebsite.com/thetrack.mp3|artists=Artist|titles=Titles]");  
            } ?>

I must get this to editable in the after sales easily, simply by entering some meta-data. Which means this

<?php meta('track-url'); ?>

Together with other various particulars would replace individuals which are above.

Regrettably for me personally, this

                <?php if (function_exists("insert_audio_player")) {  
              insert_audio_player("[audio:<?php meta('track-url'); ?>|artists=Jack Presto|titles=Track 1]");  
            } ?>

clearly doesn't work! This really is lower to my lack of knowledge if PHP - can anybody help?

Cheers!

Simple! Do that:

<?php if (function_exists("insert_audio_player")) {
   $trackUrl = meta('track-url');
   insert_audio_player("[audio:$trackUrl|artists=Jack Presto|titles=Track 1]");  
} ?>

I can not know if the meta() function prints towards the screen or returns a string. Whether it returns a string, do:

<?php
if (function_exists("insert_audio_player")) {  
     insert_audio_player('[audio:' . meta('track-url') . '|artists=Jack Presto|titles=Track 1]');  
}
?>

Whether it prints towards the screen, it's a little more difficult. Ideally, you'd possess a function that DOES return a string, but like a quick hack (if you are only getting taken care of a fast fix) you could do this something similar to

<?php
if (function_exists("insert_audio_player")) {  
     ob_start();
     meta('track-url');
     $meta = ob_get_contents();
     ob_end_clean();
     insert_audio_player("[audio:$meta|artists=Jack Presto|titles=Track 1]");  
}
?>