Closed ghost closed 2 years ago
This line is missing a closing PHP tag:
<img src='<?php echo $result>'>
It should be:
<img src='<?php echo $result ?>'>
If that doesn't resolve your issue, let me know more about how it's failing. For example, is the image just not loading or are you getting an error message? If the latter, what is the error message?
Also, it's always helpful to include links to the relevant files in your Github repository so we can see exactly what you're working with.
One more thing: when setting the $result to $imagePath, do not put $imagePath in quotes.
It should look like this:
if(statement) {
$result = $imagePath;
}
thank you
This is a good question. The things you may want to start thinking about in this case are the scope of the variable and if it is called/passed/assigned by value or by reference. If this question gets you to the point where you understand the questions above that's a big win at this point. They're starting to introduce these concepts gradually now and I'm sure we'll have a handle on them in full before the course is over.
Thank you, I'm excited to learn more about it from course's materials
Hi,
If I store a variable inside another variable in index file, how do I call it from view file, I'm trying the following:
view file:
index file:
Thank you