Po wykonaniu przedstawionego kodu PHP, w zmiennej $napis zostaje zapisany ciąg znaków.
| $napis = "Programowanie w PHP"; $napis = substr($napis, 3, 5); |
| $napis = "Programowanie w PHP"; $napis = substr($napis, 3, 5); |
| $tab = array(); for($i = 0; $i < 10; $i++) { $tab[$i] = rand(-100, 100); } foreach ($tab as $x){ if ($x < 0) echo "$x "; } |
$tab = explode(", ", "jelenie,sarny,dziki,lisy,borsuki"); echo $tab[1]." ".$tab[2];
Kod 1do { suma = suma + i; } while (suma <= liczba); cout << suma; | Kod 2if (suma <= liczba) { suma = suma + i; i++; } else cout << suma; |
Kod 3for (i = suma; i <= liczba; i++) suma = suma + i; else cout << suma; | Kod 4while (suma <= liczba) { suma = suma + i; i++; } cout << suma; |


$i = 20; $a = 0; while($i) { $a += 2; $i--; }

| ALTER TABLE pracownicy MODIFY plec char(9); |
<!DOCTYPE html> <html> <head> <style> div~p { color: blue; } </style> </head> <body> <div> <p>pierwszy paragraf</p> <div> <p>drugi paragraf</p> <p>trzeci paragraf</p> </div> <p>czwarty paragraf</p> </div> </body> </html>
int[,] array = new int[3, 3];
ALTER TABLE nazwa1 ADD nazwa2 DOUBLE NOT NULL;| Resize string Resizes the string to a length of n characters. If n is smaller than the current string length, the current value is shortened to its first n character, removing the characters beyond the nth. If n is greater than the current string length, the current content is extended by inserting at the end as many characters as needed to reach a size of n. If c is specified, the new elements are initialized as copies of c; otherwise, they are value-initialized characters (null characters). Parameters n New string length, expressed in number of characters. size_t is an unsigned integral type (the same as member type string::size_type). c Character used to fill the new character space added to the string (in case the string is expanded). Źródło: http://www.cplusplus.com/reference/string/string/resize/ |
<source src="plik.mp4" type="video/mp4">Aby osadzić plik wideo na stronie WWW, przedstawiony kod HTML5 należy umieścić wewnątrz znaczników:
