Welcome Guest, Not a member yet? Register   Sign In
problem with $posts variable
#3

Your view file has a loop that reads

Code:
foreach($posts as $post)

but in your controller you set the variable to $data['post']. You need to change it to $data['posts'] for your loop to work correctly.
Reply


Messages In This Thread
problem with $posts variable - by anmol - 03-25-2017, 11:05 PM
RE: problem with $posts variable - by Wouter60 - 03-25-2017, 11:27 PM
RE: problem with $posts variable - by ChicagoPhil - 03-25-2017, 11:49 PM
RE: problem with $posts variable - by ChicagoPhil - 03-25-2017, 11:53 PM
RE: problem with $posts variable - by ChicagoPhil - 03-25-2017, 11:57 PM
RE: problem with $posts variable - by anmol - 03-26-2017, 12:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB