Dat Posted September 3, 2008 Share Posted September 3, 2008 What is the best way to display this: <?php if ($USER[loggedin] == true): ?> Welcome to $SITE[sitename] $USERS[username], <?php endif; ?> The arrays have values. My question is what is the best and easiest way to echo these arrays? Obviously you can place '<?php echo $SITE[sitename] ?>' but I want to know an alternative because I will be placing these arrays all over my site. It would be tedious work to place echoing and php syntax's everywhere. Quote Link to comment Share on other sites More sharing options...
cyrixware Posted September 3, 2008 Share Posted September 3, 2008 What is the best way to display this: <?php if ($USER[loggedin] == true): ?> Welcome to $SITE[sitename] $USERS[username], <?php endif; ?> The arrays have values. My question is what is the best and easiest way to echo these arrays? Obviously you can place '<?php echo $SITE[sitename] ?>' but I want to know an alternative because I will be placing these arrays all over my site. It would be tedious work to place echoing and php syntax's everywhere. You can try create a page for your session() and include that file your session() in your every pages... Quote Link to comment Share on other sites More sharing options...
Dat Posted September 3, 2008 Author Share Posted September 3, 2008 What is the best way to display this: <?php if ($USER[loggedin] == true): ?> Welcome to $SITE[sitename] $USERS[username], <?php endif; ?> The arrays have values. My question is what is the best and easiest way to echo these arrays? Obviously you can place '<?php echo $SITE[sitename] ?>' but I want to know an alternative because I will be placing these arrays all over my site. It would be tedious work to place echoing and php syntax's everywhere. You can try create a page for your session() and include that file your session() in your every pages... Example please? And a newbie explanation please xD Quote Link to comment Share on other sites More sharing options...
Dat Posted September 6, 2008 Author Share Posted September 6, 2008 I found that this approach is the best solution but there is a problem with it: if ($USERCAN[viewuserlist] == 1) { $content = "<a href="$SITE[urlusers]/userlist.php">View Memberlist</a><br /><br /><br /> <b>User Links</b><br /> <a href="$SITE[urlusers]/logout.php">Logout</a><br />"; } As you can I have to add \" to every freaken quote! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.