Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.