⊗ppPmBsVVCh 15 of 447 menu

Changing Variable Values in PHP

A variable's value is not something rigidly attached to it. We can freely write some data into a variable, read it, then write something else - and so on. See the example:

<?php $a = 1; // writing the value 1 to the variable echo $a; // will output 1 $a = 2; // now writing the value 2, overwriting the value 1 echo $a; // will output 2 ?>

Create a variable $a. Write the value 10 into it, output it to the screen. Then write the value 20 into it, and output it to the screen.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline