Issue
In Codeigniter, how can I verify the value of a variable, defined in a model? I am a newbie in CI and I searched the Documentation and Stackoverflow, and I couldn't find any information.
echo and print output don't print anything, like echo "Hello word"; print("hello world"); var_dump($array);
Solution
CodeIgniter is a MVC framework which means Model - View - Controller.
In such a Framework, you have:
- your Model code to store/persist your data (and to access it),
- your Controller code to manage the logic of your program,
- and your views to display to the user the result.
In your case, you then need to pass your data from the model, to the controller and finally to your view to have an idea of the data stored. So try to pass your data to your view in order to var_dump it their.
EDIT:
You should go to the user guide written on the official website which explains really well how to make a simple example https://codeigniter.com/user_guide/index.html
Precisely:
- Basic Hello World in a controller
- Create your models
- Full example of a news section
Answered By - lucasfoufou
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.