Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to put links in an array


mark27uk3

Recommended Posts

Hi Guys,

 

Would one of you kind souls please show me how to put the following code from one of my infoboxes into an array so that the links show inside the infobox.

 

At the moment the link images show but outside the infobox and for the life of me can not get the array right.

 

<!-- my_new_box //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => 'Find Us Here');

new infoBoxHeading($info_box_contents, true, true);
?>
<tr>
 <td align="center">
<a href="http://www.kelkoo.co.uk/"><img src="images/kelkoo.gif" width="102" height="40" vspace="0" hspace="0" border="0" alt="Kelkoo - Compare. Buy. Save."></a>
<br>
<a href="http://www.ontheweb.co.uk/"><img src="images/uk_88x31.gif" width="88" height="31" vspace="0" hspace="0" border="0" alt="Search For It ontheweb.co.uk"></a>
<?php

$info_box_contents = array();
$info_box_contents[] = array('text' => '');

new infoBox($info_box_contents);
?>

</td>
</tr>

</td>
</tr>
<!-- my_new_box_eof //-->

 

Thanks

 

Mark

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

Hi Guys,

 

Would  one of you kind souls please show me how to put the following code from one of my infoboxes into an array so that the links show inside the infobox.

 

At the moment the link images show but outside the infobox and for the life of me can not get the array right.

 

<!-- my_new_box //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => 'Find Us Here');

new infoBoxHeading($info_box_contents, true, true);
?>
<tr>
 <td align="center">
<a href="http://www.kelkoo.co.uk/"><img src="images/kelkoo.gif" width="102" height="40" vspace="0" hspace="0" border="0" alt="Kelkoo - Compare. Buy. Save."></a>
<br>
<a href="http://www.ontheweb.co.uk/"><img src="images/uk_88x31.gif" width="88" height="31" vspace="0" hspace="0" border="0" alt="Search For It ontheweb.co.uk"></a>
<?php

$info_box_contents = array();
$info_box_contents[] = array('text' => '');

new infoBox($info_box_contents);
?>

</td>
</tr>

</td>
</tr>
<!-- my_new_box_eof //-->

 

Thanks

 

Mark

 

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => 'Find Us Here');

 

new infoBoxHeading($info_box_contents, true, true);

?>

<tr>

<td align="center">

 

<?php

$text = '<a href="http://www.kelkoo.co.uk/"><img src="images/kelkoo.gif" width="102" height="40" vspace="0" hspace="0" border="0" alt="Kelkoo - Compare. Buy. Save."></a>

<br>

<a href="http://www.ontheweb.co.uk/"><img src="images/uk_88x31.gif" width="88" height="31" vspace="0" hspace="0" border="0" alt="Search For It ontheweb.co.uk"></a>';

 

$info_box_contents = array();

$info_box_contents[] = array('text' => $text);

 

new infoBox($info_box_contents);

?>

 

</td>

</tr>

 

</td>

</tr>

 

 

 

something like that

Treasurer MFC

Link to comment
Share on other sites

Amanda,

 

Thanks for that, I just made one change.

 

I removed the center align from the td tag and put it into the $info_box_contents so now it reads

 

<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => 'Find Us Here');

new infoBoxHeading($info_box_contents, true, true);
?>
<tr>
<td>

<?php
$text = '<a href="http://www.kelkoo.co.uk/"><img src="images/kelkoo.gif" width="102" height="40" vspace="0" hspace="0" border="0" alt="Kelkoo - Compare. Buy. Save."></a>
<br>
<a href="http://www.ontheweb.co.uk/"><img src="images/uk_88x31.gif" width="88" height="31" vspace="0" hspace="0" border="0" alt="Search For It ontheweb.co.uk"></a>';

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center', 'text'  => $text);

new infoBox($info_box_contents);
?>

</td>
</tr>

</td>
</tr>

 

Thanks Again

 

Mark :thumbsup:

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...