Skip to content

Set first bootstrap card (item) as active

I’m using carousel to display data from database and I tried to set first card active but it won’t work and cards are static. Cards works fine without php. I was trying to use boolean variable and set …

a PHPpunit test fail randomly

I have a Quiz class. This class load 10 questions from a database depending on the level and the type of the quiz Object: level 0 load the ten first, level 1 load the next ten and so on. So in my test i create in a test database 30 questions. Then i create quiz object with different level and

Undefined variable in Laravel 8 (running php 8)

I try to show variable from the controller to blade in laravel but the result is “Undefined Variable” UserController.php public function user(){ $people = [‘Edwin’,’James’,’Rock’,’Peter’…

How to call PHP function using Ajax (Javascript, PHP and Yii1.1)

I am looking to call a PHP function through an onclick event. The PHP action within the controller then should start a download for a json File containing the needed data. I already know ajax and I am using it currently but somehow the function does not fire. I am 100% certain that I am doing something wrong,…

I keep getting a warning when I put an array in a foreach loop

Here is my code. It gives me a warning when I use line 3 of my code. The $object passed in the parameter is a json object and I am trying to for loop through it and display tweets. The code at first doesn’t produce warnings but then out of no where it will and it pops my page with

DataTables can’t read more than one Data

I would like to ask why is the DataTable can’t read more than 1 data in my Database? I would appreciate any help since I’m relatively new with the Data Table, thank you. As you can see it’s only showing 1 to 1 of 1 entries. But as seen in the table I have 5 retrieved data. and when I