|
Posted by Schraalhans Keukenmeester on 05/18/07 05:21
At Thu, 17 May 2007 20:25:13 -0700, flamer die.spam@hotmail.com let his
monkeys type:
> On May 18, 2:47 pm, bokke <micr...@gmail.com> wrote:
>> Hi - I am using this code
>>
>> echo "<tr><td></td><td id=tablesdirhead>Property Information</td><td
>> id=tablesdirhead width='100'>Agent Name</td><td id=tablesdirhead
>> width='150'>Contact Info</td></tr>\n";
>> while ($myrow = mysql_fetch_row($result))
>> {
>> $row = 1-$row;
>> $color = ($row==0)?"#F5F5F5":"#F0F8FF";
>> printf("<tr bgcolor=$color><td>%s</td><td>%s</td><td>%s</td><td>%s</
>> td></tr>\n",
>> $myrow[5], $myrow[3], $myrow[0], $myrow[1]);}
>>
>> echo "</table>\n";
>> ?>
>>
>> But would like to give the fourth "$myrow[1]" a PHP link like
>>
>> <a class="dir" href="processformImage.php?action=&ID=<?php echo
>> $row["StoreID"]; ?>">$myrow[1]</a>
>>
>> But can't seem to find anywhere on the web that shows this can even be
>> done
>
> echo " <a class=\"dir\" href=\"processformImage.php?action=&ID=
> $row["StoreID"]\">$myrow[1]</a>";
>
> Flamer.
Both array references need to be enclosed in braces for this to work.
Why not use heredoc syntax:
echo <<<END
<a class="dir"
href= "processformImage.php?action=&ID=$row['StoreID']">$myrow[1]</a>
END;
Sh.
Navigation:
[Reply to this message]
|