0

I don't really why index and others are undefined as I already rendered positions from index.html

Here is my portfolio.php (the view file)

Here is my index.html

Can anyone tell me why all the index are undefined as I already rendered $positions who contain all of the index?

0

Just a little typo. $positions is the array of arrays. Each element is $position. Check the spelling in the foreach loop.

2
  • Alright thanks. I had correct the spelling but it still displays nothing. The value seem to be hidden or blocked, the table just not displayed.
    – user7519
    May 31 '17 at 0:12
  • That could happen if the $positions array is empty. You could add a debug message before the foreach, something like print("<h2>".count($positions)."</h2>");. And it's missing table tags and tr close tag. May 31 '17 at 1:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .