Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Disable your ad blocker to continue using our website.
I am trying to get all the courses from tbl_courses . My tbl_courses has only 3 column, and those are course_id, courses, and number_of_enrolled_students .
//select all courses
$get_all_courses_sql = "SELECT * FROM tbl_courses ORDER BY courses Asc ";
$get_all_courses_data = $con->prepare($get_all_courses_sql);
$get_all_courses_data->execute();
In this code you are assigning a value to $courses in your while loop, but you're looking at $get_courses in the loop body. $get_courses is probably null, and you're trying to treat it like an array; that's what your error means. I'm guessing this is a typo and you meant to use $courses rather than $get_courses inside the loop.
ASSP Deluxe is a nifty antispam plugin for cPanel that eradicates spam email and the easy-to-install widget comes loaded with additional features and customizations. You can set up criterion for custom spam boxes, receive daily email reports, and tinker with a whole host of other automatable functions, cutting a fraction of your workload.