Please Don't Fear!

Sandbox: Let's Roll!

"; $hellomsg = "Hello Kyle, world is good.
"; /* note: single quotes would not do in place variable substitution */ echo "{$hellomsg}"; /* weird, opposite of bash */ $myarray = array(12, 21, 33, 99, 33, "fox" /* hmm this is nice */, array("bro", "brotato")); echo "2nd item in our array is " . $myarray[1] . " " . $myarray[6][1] . ".

"; /* key-value pairs, i like them, dejavu Lua! */ $keyval = array("name" => "bro", "status" => "amused", "location" => "/dev/null"); echo "$keyval[name] is $keyval[status]"; echo "

";
    print_r($keyval);
    echo "

"; /* array into a string? seems heck useful */ $str_from_arr = implode(" ~ ", $keyval); /* 1st param = glue */ echo "the imploded array is: {$str_from_arr}"; ?>
Is Pi set? "; else echo "No" . "
"; /* how to escape? */ $var1 = "\"brotato escaped\""; echo "escaped: " . $var1 . ", ha it is just like C!". "
"; unset($pi); /* why not just set it to null? we can set it to 0, "0"! and null */ if (empty($pi)) echo "Pi has been unset.
"; ?>
Typecasting, php is very clever!
"; settype($piphi, "string"); /* or just typecast, (string) in front ? */ /* constants */ define("PI_VAL", 3.14159); ?>