This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "Hello world!"; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('MY_CONSTANT_NAME','The value of my constant'); | |
echo MY_CONSTANT_NAME; | |
// This will show 'The value of my constant' on your screen | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$newVariable = 'Hello World'; | |
echo $newVariable; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$newVariable = 'Hello World'; | |
echo $newVariable; | |
$newVariable = 'Goodbye World'; | |
echo $newVariable; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$categories = array('my first category', 'another one', 'etc'); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "My first category is " . $categories[0] | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$categories = array( | |
'first' => 'my first category', | |
'second' => 'new category', | |
'third' => 'etc...' | |
) | |
// Show the second category | |
echo "The second category is " . $categories['second']; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$shop = array( | |
'electronics' => array( | |
'stereo set', | |
'speakers' | |
'tv' | |
), | |
'software' => array( | |
'games', | |
'office', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
B2G_HOME=$PWD | |
. load-config.sh | |
DEVICE=${DEVICE:-generic} | |
TOOLS_PATH=$B2G_HOME/out/host/`uname -s | tr "[[:upper:]]" "[[:lower:]]"`-x86/bin | |
DBG_CMD="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Test script for detecting the OS by user agent string | |
// uses the API from http://www.useragentstring.com | |
// Do not forget to add caching! Continuously hitting the | |
// API is bad for performance of both the API and your | |
// application. | |
$apiParams = array( | |
'uas' => $_SERVER['HTTP_USER_AGENT'], | |
'getJSON' => 'os_name' |
OlderNewer