Jump to content

Simple If statement


rn14

Recommended Posts

Could anybody tell me why the if statement below will not work? And how to get it to work? The value of meals changes and what i want to happen is when it increases by 20 for the value of people to increase by one.

 

Thanks in advance.

 

if ($meals = "20")

$people = "1";

elseif ($meals = "40")

$people = "2";

$peop = $people;
echo $peop;

Link to comment
https://forums.phpfreaks.com/topic/133135-simple-if-statement/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.