note 30114 deleted from tutorial.firstpage by alindeman

From: Date: Sat, 03 May 2003 13:11:28 +0000
Subject: note 30114 deleted from tutorial.firstpage by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-47419@lists.php.net to get a copy of this message
Keep it simple. Please pardon my ignorance, being a novice with PHP, because this should have probably been obvious. But in browsing this tutorial, as well as the manual it's all fine and good that <?php echo "Hello world!"; ?> outputs the obvious, but I think it would be as important to cut to the chase in pointing out the simplicity of using variables and literals since a majority of any scripting is the ability to juggle and manipulate these as opposed to just outputting text that can be produced with straight Html. It took me an inordinate amount of time to discover that <?php echo 2 + 2; #Value 4 ?> <BR> <?php $var1 = 1; $var2 = 9; echo $var1 + $var2; #Value 10 ?> <BR> <? $var1 = 1; $var2 = 9; echo ($var1 + $var2) * 5; #Value 50 ?> <BR> <? $var1 = 1; $var2 = 9; echo (($var1 + $var2) * 5) / 4; #Value 12.5 ?> Outputs the following, 4 10 50 12.5 I know this sounds pretty basic, but in searching comparatively for a language to replace years of Html/Mivascript, (some in combination with Javascript), and dBase data programming, it was this simple understanding of how to convert complex expressions that sold me on PHP over Perl and ASP among others. Htmlscript or Miva at one time was also an easy to use, freely available, Html embeddable language. Now that it requires a purchased compiler (which I believe should be optional), generates external source files, has severe limitations in working with external databases other than dBase, among further concerns about backward compatability. I've found that PHP's ease of use and advantages of significantly superior power and capabilities has gotten me stoked. Before this, there wasn't a lot of excitement round here when considering the daunting task of moving all this previous work over to Perl or, heaven forbid, ASP. Any suggestions would greatly be appreciated. Anyway, something as simple and as obvious as knowing how to make 2+2=4 can win a greater following of those who might feel a bit intimidated or that the learning curve is too steep and complex.

« previous php.notes (#47419) next »