Jump to content

*resolved* Array[url] instead of the value stored in that array


spikeon

Recommended Posts

ok, so heres the code:
[code]
<?php
include('list.php');
foreach($anime as $ani){
$newnum=$ani[num];
echo "<table>";
echo "<tr><td colspan=2>$ani[name]</td></tr>";
echo "<tr><td>$ani[$newnum][title]</td><td>$ani[num]</td></tr>";
echo "<tr><td colspan=2>$ani[$newnum][desc]</td></tr>";
echo "<tr><td>Download Link</td><td><a href='$ani[$newnum][url]'>$ani[name] - $ani[num] </a></td></tr>";
echo "</table> <br /><br />";
}
[/code]

the array is here:

[code]
<?php
$anime[nar][name]="Naruto";
$anime[nar][num]="212";
$anime[nar][212][desc]="Description";
$anime[nar][212][title]="Title";
$anime[nar][212][dl][url]="http://www.anime-spike.com/Naruto/Naruto-212.avi";
?>

[/code]

the end result is here:

[code]
<table><tr><td colspan=2>Naruto</td></tr><tr><td>Array[title]</td><td>212</td></tr><tr><td colspan=2>Array[desc]</td></tr><tr><td>Download Link</td><td><a href='Array[url]'>Naruto - 212 </a></td></tr></table> <br /><br />
[/code]

the code i want it to display is here:

[code]
<table><tr><td colspan=2>Naruto</td></tr><tr><td>Title</td><td>212</td></tr><tr><td colspan=2>Description</td></tr><tr><td>Download Link</td><td><a href='http://www.anime-spike.com/Naruto/Naruto-212.avi'>Naruto - 212 </a></td></tr></table> <br /><br />
[/code]

why is it not doing what i want, and how do i fix it?

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.