Get up to 80 % extra points for free! More info:

Discussion – Lesson 5 - Making an object-oriented component in PHP - Image Gallery

Back

 

Comments
Avatar
Aljon Olela
Member
Avatar
Aljon Olela:3/3/2018 4:00

Change your while condition in Method load()
from
while ($directory = $directory->read())
to
while ($item= $directory->read())

 
Reply
3/3/2018 4:00
Avatar
Replies to Aljon Olela
David Capka Hartinger:3/4/2018 12:54

Hi Aljon, thanks for the info, we've fixed it. We also added 10 points to your account for reporting the mistake.

Reply
3/4/2018 12:54
You can walk through a storm and feel the wind but you know you are not the wind.
Avatar
Garry A Egan
Member
Avatar
Garry A Egan:8/26/2019 18:27

In the conclusion of the article relating to Possible enhancements, it states that "One of the main ones being that the HTML code is echoed out, which makes working with it kind of confusing". I am not certain I understand the problem and what alternative(s) would you suggest.

 
Reply
8/26/2019 18:27
Avatar
Replies to Garry A Egan
David Capka Hartinger:8/28/2019 4:51

Hi Garry, it means that it doesn't use any HTML template but uses the echo() function to render HTML code instead. Ideally, HTML code and PHP code should be separated.

Reply
8/28/2019 4:51
You can walk through a storm and feel the wind but you know you are not the wind.
Avatar
Garry A Egan
Member
Avatar
Replies to David Capka Hartinger
Garry A Egan:9/1/2019 23:22

Thanks David for your clarification although now you have caused me to study the concept/use of HTML templates as I have been using the 'echo' function. Any suggestions where I could begin my further reading and study? Thanks again for your assistance.

 
Reply
9/1/2019 23:22
Avatar
Replies to Garry A Egan
David Capka Hartinger:9/4/2019 4:47

Hi Garry, it's all explained in the following course - https://www.ict.social/php/mvc

Reply
9/4/2019 4:47
You can walk through a storm and feel the wind but you know you are not the wind.
Avatar
Garry A Egan
Member
Avatar
Replies to David Capka Hartinger
Garry A Egan:9/4/2019 18:18

Thanks David, I shall begin my tuition.

 
Reply
9/4/2019 18:18
To maintain the quality of discussion, we only allow registered members to comment. Sign in. If you're new, Sign up, it's free.

7 messages from 7 displayed.