User Tools

Site Tools


functions

Functions

How do I know which function to use? It's basically a case of reading the manual. I know we are working with strings of characters (the answers), so I look at the index of string functions:

https://www.php.net/manual/en/ref.strings.php

We're doing a comparison, so I just searched (CTRL + F) the list for comparison functions. There are a few choices, but most are overkill, so I picked the simplest one. Same for case sensitive functions, I searched for 'case' and picked something simple and appropriate.

If we were working with numbers (and doing something more complex than equal to or less than etc), we'd want to look at the math functions:

https://www.php.net/manual/en/ref.math.php

functions.txt · Last modified: 2019/07/30 11:28 by nmckillop