I'am a beginner in cakephp and i have installed it , and i start every thing perfectly , But the problem is when i use the index.ctp which in view/Posts folder code is
<?php echo $v; ?>
and the PostsController.php code is
class PostsController extends AppController {
public $name = 'Posts';
public function index(){
$this->set('v',$this->Post->findById('all'));
}}
But the php code not displays nothing
please help i have to start fast because am going to be tested to get a job
$v
is an array, not a string, so you need to dopr($v)
instead of the echo. Also, a sidenote, if you are going to be tested to get a job, you should probably start on how to be a master at debugging and researching first. – Nunser