spikeon Posted December 11, 2006 Share Posted December 11, 2006 ok, so heres the code:[code]<?phpinclude('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 https://forums.phpfreaks.com/topic/30202-resolved-arrayurl-instead-of-the-value-stored-in-that-array/ Share on other sites More sharing options...
btherl Posted December 11, 2006 Share Posted December 11, 2006 Enclose each of your variables like this:[code=php:0]echo "<tr><td colspan=2>{$ani[$newnum][desc]}</td></tr>";[/code]'{' at the start, and '}' at the end. Link to comment https://forums.phpfreaks.com/topic/30202-resolved-arrayurl-instead-of-the-value-stored-in-that-array/#findComment-138842 Share on other sites More sharing options...
spikeon Posted December 11, 2006 Author Share Posted December 11, 2006 it WORKED!!!!thankyou oh so much Link to comment https://forums.phpfreaks.com/topic/30202-resolved-arrayurl-instead-of-the-value-stored-in-that-array/#findComment-138846 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.