PHP Question: How to fix these if/elseif statements

前端 未结 4 886
别跟我提以往
别跟我提以往 2021-01-23 16:30

I am trying to use these if/else if statements to display these php pages. The if/elseif statements allow for the php page to show up. The data is stored in the mysql. How do we

4条回答
  •  臣服心动
    2021-01-23 17:03

    You need to use == instead of = I don't know what the right side of the statement is, for example Politics. If its not a variable then you should put it in quotes.

    Something like this

    if ($result_array[0] == "Politics") {
            require 'news/political.php';
        }else ...
    

提交回复
热议问题