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?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.