class one and calss two (child) college and student class, inside the college class create a protectec varaible with array (courses)

06:05 PM
call from child that courses using getcourse function
06:05 PM
inside the aprent create constructior mdofiy courses protected variable in parent classs
06:06 PM
<!DOCTYPE html> <html> <body> <?php class Fruit { protected $color =[]; function __construct($color) { array_push( $this->color,$color); } } class bc extends Fruit{ public function get_course() { return $this->color; } } $apple = new bc("Apple"); print_r($apple->get_course()); ?> </body> </html>

Mragank
$tasks = [
['Learn PHP programming', [1,2]],
['Practice PHP', [2,2]],
['Work', [3,2]],
['Do exercise', [4,2]],
];
06:34 PM
$tasks = [
['Learn PHP programming',["test"=>["content"]]];
06:42 PM
$tasks = [
['Learn PHP programming',["test"=>["content"]]]
];
06:43 PM
New messages
<div id="test">get by id</div>
<div class="test">get by class</div>
<div data-id="test">get by data attr</div>
<div test="test">get by attr</div>
07:31 PM

No comments:

Post a Comment

React -1 ( react with ravenndra kanchi)

 react with tool chanis 45 to 50 sessions core  after 50 sessions -> some tooll chains == react with type script mern stackaplication in ...