Jump to content

form help with switch to array


darkfreaks

Recommended Posts

okay i spent all yesterday making like 300 if statements into one giant switch statement would it shorten the code any if i made it into an array statement?

 

case ($line==''.$reason.' Reason.'):
$message = $line.$user;
break;

 

i need something like that put into an array statement if possible

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/192730-form-help-with-switch-to-array/
Share on other sites

There's really no way you can effectively use a function in a programming language until you have studied the documentation so that you know what it accepts as parameters, what operation it performs, and what value it returns - http://us2.php.net/in_array

You have not exactly provided any information showing what you are trying to accomplish and what the result should be for any given data.

 

Based on the code in your previous thread, doing what I stated in this thread will work.

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.