<?php/********************************************* * * Rendering Views * * *******************************************/$jhon=newStdClass;$jhon->name='Jhon';$jhon->age=15;$title=$jhon->name;$ana=newStdClass;$ana->name='Ana';$ana->age=15;$paul=newStdClass;$paul->name='Paul';$paul->age=16;$friends= [$ana, $paul];//data must be an array os values$content= (new\PHPBook\View\View)->setView('subpath/to/file/view/one')->setData(['title'=>$title, 'jhon'=>$jhon, 'friends'=>$friends ])->render();echo$content;?>
The Tidelift Subscription provides access to a continuously curated stream of human-researched and maintainer-verified data on open source packages and their licenses, releases, vulnerabilities, and development practices.