CodeIgniter Forums
Cant display a field in view file - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Cant display a field in view file (/showthread.php?tid=58602)



Cant display a field in view file - El Forum - 06-28-2013

[eluser]margsot[/eluser]
Hi, I am trying to display a specific field in a view file but nothing is displayed!

The code i use is this
Code:
<p>&lt;?php echo $userDetails['location']; ?&gt;</p>

One line above the code
Code:
<p>&lt;?php echo $userDetails['description']; ?&gt;</p>
works fine.

Cant figure out why the location field isn't work

Thanks


Cant display a field in view file - El Forum - 06-28-2013

[eluser]niki_mihaylov[/eluser]
Hey, can you try var_dumping $userDetails and see if you have value for "location" , perhaps there is something wrong/missing in your query or wherever you pull info from?


Cant display a field in view file - El Forum - 06-28-2013

[eluser]margsot[/eluser]
SOLVED! i forgot to set location in array Smile