No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hello, I'm getting a error : Trying to get property of non-object. Currently using CodeIgniter php framework. **Controller:** public function index() { $this->load->model('data_model'); $data['rows'] = $this->data_model->getAll(); $this->load->view('index',$data); } **Views:** <?php foreach($rows as $r) : ?> <h1><?php echo $r->title; ?></h1> //Error on this line <div><?php echo $r->contents; ?></div> //Error on this … |
|
Hello, how does the getElementbyTagname and the length of that works ? Suppose my codes is : <!DOCTYPE html> <html> <body> <p id="demo">This is demo</p> <div id="original">This is original</div> <button onclick="myFunction()">Try it</button> <script> function myFunction() { var elements = document.getElementsByTagName("*"); alert(elements.length); }; </script> </body> </html> Output is 7. Why ? … |