This isn’t a post count thread (I think mine just went over 14,000) I think it might be fun to see just how random it can get…
?php
//phpinfo();
// can comment like in C++
can also use hash to comment
/*
multi
line
comment (also like C/C++)
*/
a_variable = _POST[‘msg’];
if ($a_variable ==’’)
{
$a_variable=‘sausage’;
}
//
// Within double quotes variables can be inserted. The following wil replace $a_variable with its contents.
//
echo “<h2>Contents of ‘a_variable’ are ‘$a_variable’</h2>”;
//
// No need to specify data type for variables
//
$auth=true;
$age=29;
$name=‘Bobby’;
$temp=98.6;
//
// == versus ===
//
$var1 = 14;
$var2 = ‘14’;
$result = ($var1 == $var2);
echo '<p>Is $var1 the same as $var2 ? ’ . ($result ? ‘Yes’ : ‘No’) . ‘</P>’;
$result = ($var1 === $var2);
echo '<p>Is $var1 the same as $var2 and of the same type? ’ . ( $result ? ‘Yes’ : ‘No’) . ‘</P>’;
//
// Testing the switch operator
//
switch ($a_variable)
{
case ‘sausage’:
case ‘Sausage’: echo “<p>YUM!</p>”; break;
case ‘liver’:
case ‘Liver’: echo “<p>YUK!</p>”; break;
default: echo “<p>HURRR?</p>”; break;
}
//
// Testing the ternary operator. (a shortcut way of doing an if/else statement. If the variable is ‘chicken’ then the protein string is supplied to the echo function. else the ‘no chicken’ string is supplied.
//
echo $a_variable == ‘chicken’ ? “<p>Protein!</p>” : “<p>no Chicken?</p>”;
Brazilian Cretaceous theropod Irritator challengeri in its original guise as a gigantic flightless pterosaur. Now known without doubt to be a spinosaurine spinosaurid (Sues et al. 2002), Irritator was - astonishingly - first published (Martill et al. 1996) as a coelurosaur and as part of Tom Holtz’s Bullatosauria (a since-disbanded ornithomimosaur + troodontid clade).
the elephant is a dainty bird. It swings from bow to bow. It sits in a rhubarb tree and whistles like a cow.
(spike miligan - paraphrased*)
[sub]*A quick google search seems to show that it is paraphrased in many different ways. The version I post here was imparted to me by an old friend. It is undeniably nonsense, and quite random.[/sub]