Profile
Achievement
engel's Recent Snippets
- All /
« Prev 1 Next »
Searches an array $haystack for $needle. Returns the value of the element which contains the first result. Use strstr_array() for case-sensitive searches and stristr_array() for case-insensitive searches.
1
2037
posted 16 years ago by engel
Running this command will append a line with given values to a file you specify. Replace words between < and > with the values you desire.
1
1111
posted 16 years ago by engel
Add this template before functions in a library, in order to give a good description of what it is and what it does. Replace all in < and > with your values.
2
953
posted 16 years ago by engel
Pass a user-inputted variable to this function in order to prevent SQL injection. Example:
mysql_query("INSERT INTO table VALUES('" . sql_sanitize($_POST["variable") . "')");
Instead of:
mysql_query("INSERT INTO table VALUES('" . $_POST["var...
34
5526
posted 16 years ago by engel