PHP - Thread Class and Array Using the provided Thread class, show a list of the
ID: 3800978 • Letter: P
Question
PHP - Thread Class and Array
Using the provided Thread class, show a list of the 3 most recent visible threads sorted to show the most recently created threads first. Print a JSON response with status code 200 and an array of threads with threadid, title, message and timeposted fields.
HINT: You can nest an array within an array in PHP
ALSO replacing any banned words in the message variable for each thread with ****. The banned words are provided in a string $bannedWords.
HINT: Pay attention to what delimits the words, not the words themselves.
Add your code to threadlist.php. Test your script by running:
threadlist.php
Explanation / Answer
Thread.php
================================================================
DatabaseFile.php
==================================================================
threadlist.php
===========================================================
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.