Use here doc in php…

Hello Friends, how are you?

I am showing now, how to use “here doc” in php? So, consider the below code-



//here is two variable




//here doc is starting…

echo <<< my_login_start()

User Name: $username

Password: $password





First I take two variable $username and $password. Then I make a echo statement, here I use a function (like variable) my_login_start(). Then I print User Name and Password accordingly variable $username & $passsword and finally I close my_login_start();. Now, It is ok.




User Name: tisuchi

Password: 1234


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s