## PHP code snippets

Category : Uncategorized

### PHP code snippets

### String manipulation

- Function: clean tags from strings
- Function: strip unwanted characters
- Function: strip unwanted characters except space
- Function: replace unwanted characters with underscore
- Function: check form completion
- Function: creates a sub array based on the string condition
- Function: get contents of a bibtex field

### Statistical

- Function: same as the MS-Excel counta
- Function: average
- Function: standard deviation
- Function: variance
- Function: cumulative distribution function
- Function: skewness
- Function: kurtosis
- Function: correlation
- Function: sum of two arrays, x and y
- Function: covariance
- Function: regression of two arrays, x and y

### Yahoo! Finance related

- Function: check if US markets are open from Yahoo! Finance
- Function: get fx rates from Yahoo! Finance
- Function: get security name from Yahoo! Finance
- Function: get security type from Yahoo! Finance
- Function: get stock details from Yahoo! Finance
- Function: get ETF or mutual fund details from Yahoo! Finance
- Function: get prices from Yahoo! Finance
- Function: get list of prices from Yahoo! Finance
- Function: get historic prices from Yahoo! Finance

### Derivatives

- Function: option value
- Function: binomial option pricing
- Function: implied volatility using binomial pricing and a call option
- Function: implied volatility using binomial pricing and a put option
- Black and Scholes Option Pricing
- Implied volatility using Black and Scholes option pricing and a call option
- Implied volatility using Black and Scholes option pricing and a put option