Logo Tutorials, Ebooks, Source Codes, Question Bank
Submit your Email ID & receive intimation about New/Updated Contents :
Advertise with us             CONTACT US
 
Android MobilesHTC MobilesMicromax MobilesMobile ArticlesMobile TermsNokia MobilesSamsung MobilesSony MobilesTablets
108 Names of GodBhajans CHALISA CollectionDevi Maa Ki AartiyanGanesh Ji Ki AartiyanHanuman Ji Ki AartiyanRadha Krishan Ji Ki AartiyanRam Ji Ki AartiyanSai Baba Ji Ki AartiyanShiv Ji Ki AartiyanTemples in IndiaVishnu Ji Ki Aartiyan
Wallpapers Pack
Bollywood FlashsFestival FlashsFlash GamesFlash MessagesFunny FlashsPatriotic FlashsPolitical FlashsSpiritual Flashs
FunStuffJokesRajnikanth JokesWhats App JokesWhats App Messages
About IndiaGeneral Knowledge Hindi RhymesMythological StoriesNursery RhymesPatriotic SongsRiddlesShort StoriesTongue Twisters
Funny SlideshowsInteresting SlideshowsMessage SlideshowsNice SlideshowsPatriotic SlideshowsSpiritual Slideshows
BirthDay SMSChristmas SMSClassic SMSFathers Day SMSFestivals SMSFriendship SMSFunny SMSHoli SMSHusbandWife SMSIndependenceDay SMSLohri SMSLove SMSMorning SMSMothers Day SMSNew Year SMSNight SMSPoetry SMSPunjabi SMSRakhi SMSSanta Banta SmSTeachers Day SMSTimePass SMSValentine Day SMS
3D WallpapersAbstract_WallpapersAnimated_WallpapersApple_Mac_WallpapersBaby_WallpapersBackGroundsBeach WallpapersBirds WallpapersCars WallpapersCartoon_WallpapersChristmas WallpapersColorFul_WallpapersColoringSheetsCool_WallpapersFish_WallpapersFlagsFlash TattoosFlowersFunny WallpapersGalleryGodsGreen_ScenesHD_High_ResolutioniPhone WallPapersLinux_WallpapersMobile_WallpapersMortality WallpapersMountain_WallpapersNatureOptical_IllusionsRosesSea_WallpapersShips WallpapersSports_GamesUltraBeautiful WallpaperValentine WallpapersVehiclesWideScreen WallpapersWildLife WallpapersWindows VistaWindowsXPWindows_7_Wallpapers
AJAX ASP.Net 2.0/3.5 C# / C-Sharp C/C++ Cryptography Data Compression Data Structures FLASH Foxpro/VFP HTML JAVA Java Scripts JSP LINUX Microsoft Office Microsoft Windows MS XNA PHP/MySQL Silverlight Software Engineering SQL SQL Server 2005 UNIX VB.Net 2005 VBScript XML
Home Search

?>
       
  
PHP/MySQL
Articles
PHP Difference between ' ' and " "

 

 

PHP Difference between ' ' and " "

We can use any one among ' ' or " " to print the statement then what is the differnce between ' ' and " " ?

lets have a simple example 2+3=5in php

<?php
$a=2;
$b=3;
$c=$a+$b;
?>

so to print $c we can use either ' ' or " "

<?php
$a=2;
$b=3;
$c=$a+$b;
echo 'Addition of '.$a.' and '. $b.'is :'.$c;
echo "Addition of $a and $b is : $c";

?>

Here if we will run the code for both the above statemt the sane out put will come

Addition of 2 and 3 is : 5

So the advantages of " " is inside that if we will use any variable it will print the value of that variable where as in ' ' we need to concatenate it to make it a string.

 








allfree-stuff.com - Free Education for ALL - for any queries contact @ webmaster@allfree-stuff.com