[eluser]Unknown[/eluser]
Hello CI users!
I am pretty new to CI and I decided to develop some project using this great framework.
I have some troubles when parsing template. I have my controller file written and now I am trying to parse data from database to view file.
I was successfull but I have one problem.
I have some files uploaded and their name is stored in database. So for example somebody will upload file "picture.jpg", so it will be stored in MySQL. And the thing I need is to add condition to the template:
If the file has .jpg extension, output will be IMG HTML code. But if there will be .swf I can't keep the IMG HTML code because the .swf will not display. So if the uploaded file will be .swf, it should echo the OBJECT code etc.
All I need is somebody to tell me how to handle conditions (IF, else) while parsing template. Is that possible? I guess yes. But I don't know how for now
Thank you
Tomas