How to make a logged in and logged out php link?

Hi

I am using shortcode exec php plugin to make a menu. Patrick was kind and helped me put together a link that only showed when the user was logged in.

I now want to change this slightly and have the menu link take you to the login page if you are not logged in and if you are it take you to the correct link.

Heres what I had in mind but it doesnt work :S

<?php if (is_user_logged_in()): ?>

echo ‘<a href=”‘;

echo (bp_loggedin_user_domain() . “classifieds/my-classifieds”:wink:;

echo ‘”>My Broadcasts’;

}else{

echo ‘<a href=”http://www.mywebsite.com/wp-login/&#8217;;

<?php endif; ?>

I am close right?

Kind Regards

Mark