I'm wanting to create a config file for my site, and for like my mysql user pass and db's. However, i'm kinda lost attempting to do it.
I thought it was $config['var'] = "Table color or whatever";
Then i includ ethe config file corect? Well my question is, when i am on my individual pages.. How do i call that var.. IE>
<table border="0" backgroundcolor="$config['var']" > ???
Thank you
Anthony
Config File
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
well.. if that's in an echo, i.e.<table border="0" backgroundcolor="$config['var']" >
Code: Select all
<?php
echo "<table border="0" backgroundcolor="{$config['var']}" >"; // or
echo '<table border="0" backgroundcolor="'.$config['var'].'" >'; // there are plenty of other ways..
?>Code: Select all
<?php ?>
<table border="0" backgroundcolor="<?php echo $config['var'] ?>" >