0

I get that render in a nutshell renders a template I want. For example when I want the site to render login_form I can use it I however do not understand what $values [] does

Well, because render calls extract on that second argument, an array, before
requiring header.php , header.php ends up having access to a     variable called
$title

I dont really understand what this means. I can what it can do I can use this to change the title for my liking

 render("portfolio.php", ["title" => "Portfolio"]);

Does render give portfolio an associative array called title with the value Portfolio?
Is the second argument required? Can anyone explain it to me?

2

solved via reddit thanks to FReeER for helping me figure out with the long explanations it really helped me

https://www.reddit.com/r/cs50/comments/3m6qp0/i_dont_really_understand_what_function/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .