Hello Everyone,
Help! Let me explain what I'm trying to do and hopefully someone can set me straight.
I have picture A and link A in a table row and I need the same link A and description A to go into another table row right next to it. No problems there but I want to incorporate PHP so there's a different picture B and link B in a table row that correlates with link B and description B in the same table row.
Right now I'm getting picture A in one table row and description B in the table row next to it. Eek! 🙁
Here's an example of my code which is obviously wrong:
<table width=548 cellpadding=0 cellspacing=0 border=0>
<tr valign=top>
<td width=85><BR>
<?php
$topic_pic[] = 'PICTURE A';
$topic_url[] = 'URL A';
$topic_pic[] = 'PICTURE B';
$topic_url[] = 'URL B';
$topic_pic[] = 'PICTURE C';
$topic_url[] = 'URL C';
$topic_nr = rand(0,$topic-1);
$pic = $topic_pic[$topic_nr];
$url = $topic_url[$topic_nr];
echo "<a href='$url'><img src='$pic' border=0 align=left></A>\n";
?>
</td>
<td width=5><img src="/pixel.gif" width=5 height=1></td>
<td width=179>
<BR><b><FONT FACE="arial, helvetica">
<?php
$topic_url[] = 'URL A';
$topic_txt[] = 'URL TEXT A';
$topic_desc[] = 'DESCRIPTION A';
$topic_url[] = 'URL B';
$topic_txt[] = 'URL TEXT B';
$topic_desc[] = 'DESCRIPTION B';
$topic_url[] = 'URL C';
$topic_txt[] = 'URL TEXT C';
$topic_desc[] = 'DESCRIPTION C';
$topic = count($topic_txt);
$topic_nr = rand(0,$topic-1);
$url = $topic_url[$topic_nr];
$txt = $topic_txt[$topic_nr];
$desc = $topic_desc[$topic_nr];
echo "\n<a href='$url'>$txt</a>\n";
echo "\n<BR></B></FONT><FONT FACE=times new roman, helvetica>$desc</FONT>";
?>
</td>
And then, of course, my code goes on. Can anyone help?