In this tutorial I discuss a method to shorten your if statements when many checks of equivocation (checks where you see if an item is equal to another), are used. We make use of the in_array function, which checks the value in question against an array you define. This method, although slightly less efficient in code running time, is much faster in the time spent coding. This compromise is, in general a great one to make. This video is part of a quick tip series, feel free to check out my other tips to help improve your coding ability, speed and efficiency! If you have any questions or comments, feel free to send me a message or leave a comment bellow!
No comments:
Post a Comment