Some PHP functions and code snippets useful for PHP Programmers and scripts.
New PHP Code Snippets might be added soon.

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which attribute is used in <a> tag for the address of the link?
src href rel
<a href="http://coursesweb.net/" title="CoursesWeb.net">CoursesWeb.net</a>
Which CSS property sets the type of the text font?
font-family text-decoration font-size
h2 {
  font-family:"Calibri",sans-serif;
}
What instruction selects all the <div> tags with class="cls"?
querySelector("div.cls") getElementsByTagName("div") querySelectorAll("div.cls")
var elm_list = document.querySelectorAll("div.cls");
var nr_elms = elm_list.length;       // number of selected items
alert(nr_elms);
Indicate the function that can be used to get the sum of values in an array.
array_sum() array_diff() array_shift()
$arr = array(1, 2, 3, 4);
$arr_sum = array_sum($arr);
echo $arr_sum;       // 10
PHP Code Snippets

Last accessed pages

  1. Mahjong Games (13787)
  2. Select the Content of HTML Element (1807)
  3. Mahjong Gardens (4150)
  4. Escape Games (5820)
  5. SSEP - Site Search Engine PHP-Ajax (5098)

Popular pages this month

  1. Qwop (4763)
  2. Bubbles3 (4404)
  3. Butterfly Kyodai (3133)
  4. Zuma Deluxe (2904)
  5. Backgammon (1486)