Thank you.
Maybe I was not clear. I want to replace the URL that is created by this statement:
$link[] = 'index.php?id='.$row['fld_main_link_id'].'&ss='.$row['fld_ss'].'&'.$row['fld_link'];//$row['fld_link']
with another web address, for example somesite.com
I thought that this would work:
if catArray[] = 4 $link[] = 'http://somesite.com';
but I end up with this error: Parse error: syntax error, unexpected T_STRING, expecting '(' in /home/moc/public_html/nav.php on line 26
Line 26 is the line I added.
Here is the code I am working with, with my line added at the end:
sql = "SELECT * FROM tbl_main_links ORDER BY fld_main_link_id";
#### Query 1 MAIN LINKS ####
$sql = "SELECT *
FROM tbl_main_links ml
WHERE ml.fld_status ='1'
ORDER BY ml.fld_sort ";
$result = mysql_query($sql, $db_connection) or die(mysql_error());
$catArray = array();
$name = array();
## fetch an array ##
while ($row = mysql_fetch_assoc($result)):
## build the arrays for looping through sub links ##
$catArray[] = $row['fld_main_link_id'];
$text[] = $row['fld_text'];
$ssL[] = $row['fld_ss'];
$link[] = 'index.php?id='.$row['fld_main_link_id'].'&ss='.$row['fld_ss'].'&'.$row['fld_link'];//$row['fld_link']
if catArray[] = 4 $link[] = 'http://somesite.com';
Thanks in advance for any assistance!