Hello. I am setting up mochi leaderboards for my arcade, and the only thing I can pull up for the game name is the name of the swf file for it to work. Right now I have <?php $values = get_post_custom_values("swf_url"); echo $values[0]; ?> which displays the url: http://mysite.com/games/game_name.swf I need that to just show the file name etc: game_name.swf with out the directory and address behind it. Could I possibly do this with preg_replace?
Hi, Just use basename Example: <?php $values = get_post_custom_values("swf_url"); echo basename($values[0]); ?> PHP: Regards