Trying to merge 2 php scripts

How would I share the code and explain what I am trying to accomplish … I am stuck trying to merge one scripts functionality into another script that already does everything else I am trying to do.

Thanks

Hard to answer this question. First, you can insert code into a post as text or as a quote.
But, most likely we do not need all of your code to help you. Here are some ideas on how to
merge scripts… Hope it helps!

Usually, you do not really merge scripts, but, add one into the other. If you have working code now and want to add features into it, you should add only one new feature at a time and test it completely before moving onto the next new section. With a working code base, you must use all of their coding format so others can follow the new changes. Make sure you document the new features or changes in the code for two reasons. One, for others to follow your changes and two so that you can see where items are changed yourself.
Next, make sure your database calls are handled in the same manner as the previous code. If you use MySQL or PDO, you need to use the same access in the new code.
Remember, you do not actually just merge scripts, you rewrite one to add in the features of the second one. Therefore, you must understand both scripts completely before they can be combined. Also remember that variable names sometimes need changing if they already exist in the first script.
Perhaps you can post a small bit of the two scripts so we can see what you are attempting. Or at the least explain what the two script do. Is this a classroom question?

Sponsor our Newsletter | Privacy Policy | Terms of Service