i have this code: protected function setMeta($title = null, $keywords = null,…
Jump to turn (10)
- 1i have this code: protected function setMeta($title = null, $keywords = null, $d
- 2whats the iff for php
- 3Ternary Operator
- 4isnt null php
- 5if a var is null would ($title) work?
- 6can you write a comment for this code and how it works. protected function setMe
- 7now write a comment that i can add to other functions that use this functions on
- 8so if a function have a a value passed through it.. like the setMeta.. but lets
- 9explain ternary operator in php again..
- 10none of this code works properly... protected function setMeta($title = null, $k
- User
i have this code:
codeprotected function setMeta($title = null, $keywords = null, $description = null) { $this->view->title = $title; $this->view->registerMetaTag(['name' => 'keywords', 'content' => "$keywords"]); $this->view->registerMetaTag(['name' => 'description', 'content' => "$description"]); }now i was thinking of making the $title handle somehow if lets says its app name... then use " / " contact page.... if you happen to be on that page.. how would I code this
- Assistant