// archives

sheet

This tag is associated with 1 posts

PHP Cheat Sheet

I’ve put together this ‘cheat sheet’ in the hope that it helps some people, it shows the correct syntax for various statements and I shall add to it as I have time.
PHP Statements
array ( “key” => “value”, … );
die(”messagetoshow”);
echo item;
extract ($array;)
header (”Location: url“);
if (condition) {operation]
elseif (condition) {operation}
else {operation};
session_start();
session_destroy();
PHP MySQL Functions
mysql_connect(”host”,”uname”,”password”);
mysql_select_db(”dbname“);
mysql_query(”query“);
mysql_num_rows($result);
mysql_fetch_array($result,type_of_array);
I hope this helps someone, a [...]