PHP Language

PHP interpreter, this “program” to run the commands in the file looks for PHP. As we saw in the first chapter can be written in PHP commands:

1. <? PHP …. ?>

2. <? …. ?>

These PHP scripts are called separators, the first type is considered a long or a standard bracket, the second ike “short-bracket” is called.

Our source code is PHP, we want the creation of the page’s HTML code in the place of the so-called nested written.

<? PHP

print “Hello World!”;

?>

To add comments to pages;

<HTML>

<! – – This line of HTML comment line

As we wish we could write comments here ..

Browser does not consider these lines – ->

<HEAD>

<TITLE> With PHP Hello </ TITLE>

</ HEAD>

<BODY>

<CENTER>

<B>

<H1>

: <? PHP

/ *

This line of PHP in a multi-line comment section ..

It does not take into account the PHP interpreter will never

Can write reviews here as we wish.

* /

print “Hello World!”;

/ / This is part of PHP’s single-line comments

# These lines will not take into account the PHP interpreter.

?>

</ H1>

</ B>

</ CENTER>

</ BODY>

</ HTML>

Variables

In PHP, a computer programming language, as well as many other variables can be defined prior to putting a value into, but not required. We define the variables by putting the $ sign before the name:

$ Name;

$ Last name;

$ 123;

$ SevdigiRenk;

PHP variables by assigning the value usually determine:

$ Name = “minor”;

$ Last name = “Smiling”;

$ 123 = 123;

$ SevdigiRenk = “green”;

Variables used process, give their value:

print $ name;

As a special variable in PHP, variable name, you can also assign values ​​to use:

$ Name = “minor”;

$ Variable = “Name”;

print $ $ variable;

Here, the Browser window, “Rashid” written word, because PHP variable called $ variable “name” variable, holding his two-dollar mark will know and saw, not the $ value of the variable, it will write the value of the variable holds.

Data Types

There are six types of the world in terms of PHP value:

Integer (Integer): 5.124, 9834, such as

Dual (Double): 3.567, such as

Alphanumeric (string): “minor” as

Logical (Boolean): true (true) / false (false) as

Object (Object)

Array (Array)

Type Change

If you have doubts about the value of a variable type, PHP is it the safest way is to ask him. This question gettype () function will do.

Now, write a PHP program, Let’s assign values ​​to variables in a team and ask them to PHP types.

$ Number = 5;

print (“First name of the variable: $ num <br>”);

print (“Value:”);

print “$ num <br>”;

print (“Type:”);

print gettype ($ num); / / integer / integer

print “<br>”;

print “<br>”;

$ Alphanumeric = “minor”;

print “The second name of the variable: $ alphanumeric <br>”;

print “Value:”;

print “$ alphanumeric <br>”;

print (“Type:”);

print gettype ($ alphanumeric); / / alphanumeric / string

print “<br>”;

print “<br>”;

$ Decimal = 5.1234;

print “The name of the third variable: $ decimal <br>”;

print “Value:”;

print “$ decimal <br>”;

print (“Type:”);

print gettype ($ decimal); / / double, decimal / double

print “<br>”;

print “<br>”;

$ Logical = true;

print “The name of the third variable: $ logical <br>”;

print “Value:”;

print “$ logical <br>”;

print (“Type:”);

print gettype ($ logical); / / logical / boolean

print “<br>”;

print “<br>”;

Here, the logical (boolean) true value as the value that we assign to the right, even though the value of this variable in PHP that Notice 1. A function in PHP, the correct value is obtained as the result gives a value of 1. (Wrong / false, the value of what you would find it translated?)

Escape

the following line, you considered the reverse-forward slashes should be escaped:

print “The second name of the variable: $ alphanumeric <br>”;

Signs that have special meaning for PHP anlamlandırılmasını ignore the plain text to avoid, and this marks the reverse-forward slashes put in front of these marks.

as follows:

‘Single quotation

“Double quotes

Back-divided

$ Dollar sign

N New Line (New Line)

R Carriage Return (Return)

T Tab (Tab) character

Sometimes you need to change the type of value we assign to a variable. This settype () function will do.

$ Variable = 5.67890;

print (“The variable’s value:”);

print “$ variable <br>”;

print (“Type:”);

print gettype ($ variable); / / double, decimal / double

print “<br>”;

print “<br>”;

print “The first change process: Alphanumeric / String: <br>”;

settype ($ variable, string); / / alphanumeric / string (integer, double, Basics of)

print “Value:”;

print “$ variable <br>”;

print (“Type:”);

print gettype ($ variable); / / alphanumeric / string

print “<br>”;

print “<br>”;

Four useful function

isset () and unset ()

isset () fnksiyonu, PHP provides a variable’s value within the test exists. unset () destroys the existing variable.

if (isset ($ bir_degisken)) {

print ($ bir_degisken);

}

else {

unset ($ bir_degisken);

}

This piece of code, $ bir_degisken dğişkenin hollow now changed, the contents of the display, the presence of hollow would end.

empty ()

isset () function has the opposite function, the value assigned to a variable, or an alphanumeric value of zero or an empty (null string), the correct (true) returns the value.

$ Bir_degisken = 123;

echo empty ($ bir_degisken);

$ Bir_degisken = “”;

echo empty ($ bir_degisken);

is_string (), is_integer (), is_double (),

If the variable contains the value they’re looking for the right kind of Sınadıkları ‘True) give the result.

<? Php

$ A = 6,567;

if (is_double ($ a)) {

print (“A is double <br>”);

}

$ B = “minor”;

if (is_double ($ a)) {

print (“B String <br>”);

}

$ C = 6;

if (is_int ($ c)) {

print (“C Integer’dır <br>”);

}

?>

This code is browser window, “A is double, String B, C Integer’dır” will print. PHP is similar to these functions, but these functions are also looking for another kind of value are: is_array (), is_object.

Processors (Operators)

Arithmetic operations:

+ Collection 6 +5 = 11

– Subtraction 6-5 = 1

/ Divide 6 / 5 = 1.2

* Multiply 6 * 5 = 30

The remaining% (Modulus) 6% 5 = 1

$ Number = 4.5;

echo floor ($ number); =>> 4 (the number rounds down)

echo ceil ($ num); =>> 5 (the number rounds up)

echo round ($ number); =>> 5 (the number rounds)

echo max (13,12,5,7); =>> 13

echo min (13,12,5,7); =>> 5

Random Number

Srand ((double) microtime () * 1000000);

echo rand (20.30) =>> (20-30 points from returns)

PHP processor is equal to the assignment (=) sign remember that the compound-assignment (combined-assignment) processors, this marker is created by adding other arithmetic processors.

Meaning of Processor Example

+ = $ A + = 5 $ a = $ a + 5

$ A = $ a -= $ a -= 5 – 5

/ = $ A / = 5 $ a = $ a / 5

$ A = $ a *= $ a *= 5 * 5

= 5% = $ a% $ a = $ a% 5

.= $ A .= “text” $ a = $ a “text”

To increase or decrease a

Values ​​to increase or decrease only 1 PHP provides a convenience to:

$ A + + or + + $ a: $ a value of 1 increases;

$ A – or – $ a: $ a value of 1 means luck.

Processors are used for comparison of PHP to do the procedure right and left of the mark, after making a comparison of the values ​​or the values ​​of variables specified by the mark or right (true) or false (false), the result can take examples.

Processor Example Example $ a = 6 is:

Is equal to $ a == 5 == False / False

! = $ A is not equal! = 5 True / True

Is the same as $ a === === 5 Incorrect / False

> Is greater than $ a> 5 Doğuru / True

<Less than $ a <5 False / False

<= Less than $ a <= 5 False / False

or equal

> = Greater than $ a> = 5 True / True

or equal

A comparison between the two groups do we put this in PHP, signs marking the left and right side of the correctness or the final conclusion is correct or incorrect according to the mark makes yanlışığı. While these comparisons we use the following processors:

Processor Name Meaning Example

| | Or right to left or right | | false = true

or the right or the left or the right to | | false = true

& & To the right and left and right | | false = false

right and left and right and true | | false = false

Only the right-or left-or right-right conditional xor | | false = true

! Not left or right the wrong right | | false = true

<? Php

$ Visa = 45;

$ Final = 65;

if ($ a visa> = 50 & & $ final> = 50) {

print (“The student has passed!”);

}

else {

print (“The student left!”);

}

?>

Fixed Assets

define (“SABIT_DEGER”, value);

SABIT_DEGER here instead, we want to identify the name give to a fixed value, the value of the constant value instead of write. Example:

<? Php

$ Dolar_miktar = 125;

define (“DOLAR_KURU”, 625675);

$ TL_Tutar = $ Dolar_miktar * DOLAR_KURU;

print ($ TL_Tutar);

?>

Oluşturamayız a constant re-defined, but not a PHP error when we attempt to do so. A constant value has been established that the defined () function, we can understand:

<? Php

$ Dolar_miktar = 125;

if (defined (“DOLAR_KURU”)) {

echo (“constant value defined before. <br>”);

}

?>

Array-Variables

Detailed the number of variables in a typical series of before-to be able to look at what is happening in the variable. For example, given “PHP Programming” class were students’ list is as follows:

Create a variable number of

Now, the PHP should give us a tool so that we all at once in this list, as if each element of a variable’s value as if it were a single-single, or few have access to multiple notes doldurabilmeliyiz time and desire. Students entering the Web site going to do, and notes inceleyebilmeli be able to see their notes. PHP provides the vehicle for this purpose, multi-dimensional array-variable creation tool. And this tool can do the above list is as follows.

<? Php

$ Students = array (

array (name => “Ozbay,” last name => “Amr”, sinav1 =>””, sinav2 note =>””), =>””,

array (name => “Muharram”, last name => “Crown”, sinav1 =>””, sinav2 note =>””), =>””,

array (name => “Hassan”, last name => “Civelek”, sinav1 =>””, sinav2 note =>””), =>””,

array (name => “Sahika”, last name => “Plate”, sinav1 =>””, sinav2 note =>””), =>””,

);

/ / I will enter another code

print $ students [0] [name];

?>

The program “print ()” command, only the correct type yazmadığımızı array variable written to test this program, you type the first name of the browser window you see when you open the Browser, the array-variable is created correctly. Here, array () komutnu typing, curly brackets, not parentheses, we use the normal values ​​of each element, and note that at the end of an electronic device vrigül. One other important point: the index is to specify the names of more than one word by enclosing them in quotation marks. For example:

array (name => “Ozbay,” last name => “Amr”, “Exam 1 Notes” =>””, “Exam 2 Notes” =>””, “overall grade point average” =>””),

Here, in a manner similar to its predecessors students contents of the variable named $ array () command, see the doldurduğumuzu. Array () with the values ​​of each of such multi-dimensional and it contains an “index name” associated with array-variable, array (associative array) is also called. Those who know this kind of Perl variables in the “Hash” as well remember. Dizi’lerin associated with the first-line 0, line 1 second, 2 third line. he enumerated. Well as the index of the row of the record in this series. There are also “ordinary,” “last name,” “sinav1” .. The index is the name of the variable in the range of values. In other words, referring to these values, making reference to or accessing the row index and the index under the name of this değerleriekullanmak hitabederiz. Above as a test print () command, if you look, the first student’s name, “[0] [name]” as a calling.

Another way to create multi-element associative array, a new member in place when it comes to such a range of information about the element index and the values ​​for the index name consists of specifying the following code to write.

<? Php

$ Students [0] [name] = “Ozbay”;

$ Students [0] [last name] = “Amr”;

$ Students [0] [sinav1] = “”;

$ Students [0] [sinav2] = “”;

$ Students [0] [note] = “”;

/ / Here, here, will enter another code

print $ students [0] [name];

?>

Variable number of dimensions to be a series, so nested array () can create. According to this argument is only a one-dimensional array array () command with the given values ​​can be created and only. Let’s say that only students in the above list of names of students will be formed. In this case, the variable $ students could write on the line as follows:

$ Students = array (“Ozbay”, “Muharram”, “Hasan”, “Sahika”);

PHP, for example, the first element of such one-dimensional array, “$ students [0]” knows the name. To create such a single-dimensional array in PHP gives us another convenience: array () command without using the elements of the array directly is possible to give value. Save the program by changing only the PHP portion of the above as follows:

<? Php

$ Students [] = “Ozbay”;

$ Students [] = “Muharram”;

$ Students [] = “Hassan”;

$ Students [] = “Sahika”;

/ / I will enter another code

print $ students [0];

?>

In turn creates a series of such a variable or an array variable is created when an additional, variable in number, do not type well, PHP, sorts them himself. The above code in the browser window, “Ozbay,” will not print. When we make an additional variable to the current one-dimensional array, the array of the new value to be added to the bottom if we do not need to yazmamıza sequence number. If we want to change any existing values, then we have to write the sequence number value. To try this, the above code like this değiştirilim

<? Php

$ Students [] = “Ozbay”;

$ Students [] = “Muharram”;

$ Students [] = “Hassan”;

$ Students [] = “Sahika”;

/ / I will enter another code

$ Students [0] = “Emre”;

$ Students [15] = “Ozbay”;

print (“The 1st name in the array: $ students [0] <br>”);

print (“2 nd in the array name: $ students [1] <br>”);

print (“3’ünci the array name: $ students [2] <br>”);

print (“4th in the array name: $ students [3] <br>”);

print (“array 5 of the name: $ students [4] <br>”);

print (“Article 6 of the array name: $ students [5] <br>”);

print (“…………..< br> “);

print (“the 15th name in the array: $ students [15] <br>”);

?>

Browser window while the program will send this, the first student ($ student [0]), but Emre Ozbay, this time as we will see exactly what it says.

The reason for this statement is the array after forming the first group,

$ Students [0] = “Emre”;

We have changed the value of line with the first element. Element of the 15th to do the assignment, students $ array PHP 6, 7, 8, 9, .. We have reason to create up to 14 empty elements.

One-dimensional arrays in the name of the associated index values ​​as an array that can generate.

<? Php $ student [name] = “Ozbay”;

$ Student [last name] = “Amr”;

$ Student [sinav1] = “”;

$ Student [sinav2] = “”;

$ Student [grade] = “”;

/ / I will enter another code

print $ student [name];

?>

PHP, five separate values ​​of the variable is named $ students and their “ordinary,” “last name,” “sinav1” … you know that. Now we want to point at any value of this variable, the value index by typing the name, can we call this value we can give back.

Number of us use the variables

The above paragraph, “.. we want the variable value, that value by typing the name of the index, can we call ..” should see that we said. Array or a single, oluşturmamızın variables because the values ​​they hold and where to use the program as a requirement. Only variables that holds a value, for example print () command is often used. We invited some of the variables and values ​​of a variable number of samples above. But there are other tools to take advantage of series of values ​​of the variables.

First of all, the size of array variables, the size may be important for us. In particular, a number of variables are going to create some element of touch in the database file and how many of each element of an element that may need to know.

Where some element of an array variable, the variable count () function is learned by inquiring. count (), returns the number of elements in the array. Now let’s see this with an example.

<? Php

$ Students [] = “Ozbay”;

$ Students [] = “Muharram”;

$ Students [] = “Hassan”;

$ Students [] = “Sahika”;

/ / I will enter another code

print (” $ students in the NBC series”. count ($ students). “There are two elements.”);

?>

This program knees 4 elements that inform the browser window. Now let’s complicate things a little! The above code, print () instead of line by adding the following lines, save it.

print (” $ students in the NBC series”. count ($ students). “There are two elements.”);

print (“<br>”);

for ($ count = 1; $ counter <= count ($ students); $ counter + +) {

print (” $ string students.” $ count. “‘th element:”. $ students [$ counter]. “<br>”);

}

Before you run this program, we add to examine the lines. The first print () command browser window “printer will print” in the text should recognize the backslash sign. This, even if we have a single or double quotation marks, PHP, when he saw the name of a variable holding the value of that variable instead of writing his reasons, such as the $ sign anlamlandırılmasını for PHP in order to prevent the signs that have special meaning, and on behalf of our rescue, or escaping the character call the procedure. In this process, we want to count the characters into the text rather than PHP’s significant point to put a backslash: “like. In my case, so that PHP” $ students “as the variable name is not the word, see it as plain text. Ki, in the same command the same When we use the word again, this time as a variable name, and this variable, we use the count () value of the learning element. $ students variable “Ozbay,” “Muharram,” “Hassan” and “Sahika” values, that there, according to this variable, the count () ‘will be 4 u . (“Ozbay” = 0, .. “Sahika” .. to = 3) of this print () command, the browser window as you might guess, “$ students have at the array of 4 elements.” will print. The second print () in line the screen will send two consecutive new line sign.

Now we come to the complex! Here begins a for loop. We define the variable that will determine the cycle will repeat several times before: $ count. Then, specify the counter how much it will come up. This number, we still count () is. And of course, the final element necessary for the continuation of the for loop, the counter has the capacity to enhance expression. Our program in this cycle, ie, four times, each time an element in the array is sending the name of the browser window. Now, remember, had a number of a sequence of elements of array variables. For example, “Sahika” value of the index number 3, the fourth element, and the value of this element is sufficient to give the following command to send the screen:

print ($ students [4]);

Here is the index number of the program, the current value of $ counter variable take. Us to increase this value each time through the loop in a variable $ students at that time if we want to recall what element value, the index of that element will be provided. And as a result, program, Browser’a will send all the values ​​in the array.

Sometimes, as in this example, all the elements of the array is not a for loop, foreach loop may be easier to find. Briefly stated, the foreach loop, for all the elements of a number of variables as desired, will do the trick. The foreach loop will be executed when you type a command sayaçla not have to keep the number of times, because the loop, you give him the name of the variable will continue until the end of all values.

foreach ($ students as $ student) {

print (“$ student <br>”);

}

foreach loop, the value of the variable’s name will be drawn as the source of a series of prompts, followed by “Ace” (as) followed by the word, then each value in the array to temporarily hold the name of the variable is to be taken. The print () cmdlet, the temporary variable that holds the value gönöderecektir Browser’a. This value is a variable value of the loop every step of the series will be a list of the students.

The index values ​​for different characteristics of an array of arrays associated with the element values ​​that we invoke the name of the foreach loop requires a slightly different writing. Familiar with the fields on the type of this series of Perl “hash” as well remember. As with the variables in PHP, Perl’s hash type, the index names the “key” (key), the value of this index is determined by (yes, I guessed correctly!) Value (value) is called. Foreach loop to get the index value associated with writing, the key value and the value we have to write itself in two temporary variables

foreach ($ students as $ key => $ value) {

print (“$ key = $ value <br>”);

}

Let’s look briefly before running this code on the foreach loop: the loop, $ students began to read in sequence, in the place of analogy, the two columns, and rows will find a lot. The first of these columns, the second column is the name of the data; foreach $ key by taking the first column of data in a temporary variable, assign value, then it will pass, and the second column will take the value of the temporary variable named $ value. Loop, then print () command will perform. print (), and temporary in the value of the variable $ key, $ value after the equal sign, and finally the temporary variable will send Browser’a. print () command execution is done, foreach, we give him the key-value pair in the variable $ students cover each row facing the mold had survived, and all of the elements of this process will repeat until it is finished. Of course, the result will be sorted altalta keys and values.

At the beginning of this section have dealt with a multi-element arrays were associated. I wonder in how to receive and use their values? Of course, with a loop again. But this time, we have to use the loop-the-loop. Such a sequence eyes, visualize, perhaps better than we can see why the two loop olduğununu needed. Let us bring a table in front of our eyes: Each element of the array (in a row we have received öğrenimizde get öğrenciler9; columns include the values ​​of this element. Is the title of the column, the value of the key index

foreach ($ students as $ student) {

foreach ($ students as $ key => $ value) {

print (“$ key = $ value <br>”);

}

print (“<br>”);

}

Irdelersek Briefly, this code before foreach loop in a line of multi-dimensional variable with all the key + value çeftleri taking over, we see all of the $ students placed at the temporary variable. The first task of this foreach loop is a new start in a foreach loop. Foreach picks up the new instrument does not, before the variable itself, which is a multi-element (because of a student in, have the names of all the variables and their indices) $ students variable key and value pairs in the single-single, $ key and $ value variables, putting ; then print () command, by putting an equal sign between the values ​​of these variables is sending browser window. As soon as this cycle, which will be built first foreach work has resumed, and a new line command screen gönderierek, turning back, this time goes to an element of the new multi-dimensional array variable. Taa, however, all the elements of the array until the end of all the elements and the elements.

At this point, a warning: When we reached the actual program, the first elements of an array, the element is present in the value would be appropriate to understand. I is_array () function can do this with. This function, if the value in the array of True / True or False / False, will repay. In the example here, the first line after the foreach:

is_array ($ student)

putting line, read from the array element at that moment we can understand the value exists.

Regulation of array variables

For more efficient use of array variables PHP provides us with a set of tools. Array variables can combine them, we may slice through, sort or delete some of the elements. Now consider briefly the processes:

Merging arrays: array_merge ()

By combining all the elements of two or more series, brings a new set of. Example:

$ Birinci_dizi = array (“Ozbay”, “Muharram”, “Hasan”, “Sahika”);

$ Ikinci_dizi = array (“Amr”, “Crown”, “Civelek”, “Plate”);

$ Yeni_dizi = array_merge ($ birinci_dizi, $ ikinci_dizi);

With this code, which generated $ yeni_dizi’s number of variables that have employees, you can see a code like this:

foreach ($ yeni_dizi as $ yeni_eleman) {

print (“$ yeni_eleman <br>”);

}

All the elements of the second series, the first array elements must be added back. array_merge () operation, associated with multi-dimensional arrays can also be applied; PHP array with two-incompatible, ie, one without the other is in all the key + value pairs, create a new array. (Array_merge () Notice that survived unchanged after the combined sequences.)

Add a number of variables: array_push ()

To add new variables to an array, array_push () function, the name of the current directory and write the new values. Example:

$ Birinci_dizi = array (“Ozbay”, “Muharram”, “Hasan”, “Sahika”);

$ New = array_push ($ birinci_dizi, “Amr”, “Crown”, “Civelek”, “Plate”);

Here, a new variable named $ $ birinci_dizi only new element at the array holds the number. array_push (), we give him the name of the directory’s contents change. In the above example the array elements into a new page to display the values ​​of a code can be written as follows:

print (” $ birinci_dizi have one variable in the NBC series $ yeni_dizi <br>”);

foreach ($ birinci_dizi as $ student) {

print (“$ student <br>”);

}

Delete the first element of the array: array_shift ()

To completely remove the first element of an array-variable array_shift () function. This function is only the first element is enough to give the name of the directory will be deleted.

Example:

$ Birinci_dizi = array (“Ozbay”, “Muharram”, “Hasan”, “Sahika”);

$ Deleted = array_shift ($ birinci_dizi);

array_shift (), you provide the name of the changes the contents of the directory, in this example, a variable named $ deleted deleted the first element in the array holds the value.

Sectioning the array: array_slice ()

Instead of all the elements of an array-variable, if we want to use a cross-section, it array_slice () function can do this with. This function name of the directory will be cross-section, the section where it started and how many variables will be given as an argument.

Example

$ Birinci_dizi = array (“Ozbay”, “Muharram”, “Hasan”, “Sahika”, “Amr”, “Crown”, “Civelek”, “Plate”);

$ Slice = array_slice ($ birinci_dizi, 3, 4);

Here, a new set of PHP variable called $ section, $ birinci_dizi from the value at the 3rd series (3 included) over the value of the placement of the report here. array_slice (), does not touch the contents of the variable that we call the new array variable is created.

Sorting Arrays: sort () and rsort ()

From small to large values ​​in an array to sort alphabetically or sort () function.

Example:

$ Birinci_dizi = array (“Ozbay”, “Muharram”, “Hasan”, “Sahika”, “Amr”, “Crown”, “Civelek”, “Plate”);

sort ($ birinci_dizi);

PHP, the array will put all the values ​​from A to Z order. sort () function modifies the array içeğini. Z to an array, or to sort in descending order rsort () function in the channel. (PHP4.0 Turkish does not recognize the characters.) At some point, need to be careful: this function is associated (with values ​​as the key index name) in the array if you use PHP, the key values ​​(the index names) throws, instead of from 0 puts the figure. To avoid this, the associated arrays asort (), or ksort () function to sort by.

Sequences associated with the sort: asort () and ksort ()

Other variables by the number of sequences associated with the difference, is that of the value of the name. Values ​​in the key are called names. To sort the values ​​of an associated array asort () function is used.

Example:

$ Birinci_dizi = array (ogr_01 => “Ozbay”, ogr_02 => “Muharram”, ogr_013> “Hassan”, ogr_04 => “Sahika”);

asort ($ birinci_dizi);

PHP will put the array in alphabetical order as values. If you switch the order of values ​​rather than by value (where ogr_01, ogr_02 the words) if we are to be made by, ksort () function.

Example:

$ Birinci_dizi = array (ogr_01 => “Ozbay”, ogr_02 => “Muharram”, ogr_013> “Hassan”, ogr_04 => “Sahika”);

ksort ($ birinci_dizi);

PHP, now we will put in alphabetical order according to the keys of this array.

Text Editing and Regular Expressions

substr ($ variable, 8);

substr ($ variable, 8, 20);