Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
en:create:php [09.01.2015 12:41] adminen:create:php [26.01.2017 07:55] – [Variables] cofrin
Line 58: Line 58:
 To use the output of this function (in this case the random number), we need to file it somewhere. To do so, most programming languages use variables. You can write anything into a variable. But at the beginning, no one will see this. To use the output of this function (in this case the random number), we need to file it somewhere. To do so, most programming languages use variables. You can write anything into a variable. But at the beginning, no one will see this.
  
-In PHP, variables start wit a dollar-sign ($). The example avove uses the variable ''$number''. You can name your variables whatever you like -- except for the fact, that you must not use most special signs (!"§$%&/()=...), apart from the underscore (_). You could name the variable ''$random_number_variable'', too.+In PHP, variables start wit a dollar-sign ($). The example above uses the variable ''$number''. You can name your variables whatever you like -- except for the fact, that you must not use most special signs (!"§$%&/()=...), apart from the underscore (_). You could name the variable ''$random_number_variable'', too.
  
 The equal sign (%%=%%) is an operator. In this case it makes sure, the output of the function  ''random()'' is saved in the variable ''$number'' on the left. So the variable ''$number'' now contains  a random number. The equal sign (%%=%%) is an operator. In this case it makes sure, the output of the function  ''random()'' is saved in the variable ''$number'' on the left. So the variable ''$number'' now contains  a random number.
en/create/php.txt · Last modified: 15.04.2020 20:28 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki