You can use the tan() function in PHP's math library to find the tangent of a given number. Here's an example usage:
main.php119 chars4 linesThis will output:
main.php37 chars2 lines
Note that the tan() function expects its input to be in radians, so if you're working with degrees, you'll need to convert the angle first. For example, to find the tangent of 45 degrees:
main.php182 chars5 linesThis will output:
main.php31 chars2 lines
gistlibby LogSnag