How To Write PHP Code Or Syntax?

In PHP echo and print keyword is used to print the statement

Difference between echo and print in PHP

/* it is eample of syntax of php 
to start php code you must start with (< ?php), and end with(? >) and inside the php code block you can not write HTML code, to write html code you have to end PHP script.*/

<?php
$name 
'AJAY';

echo 
$name;

//or

echo ($name);

?>

// output will be AJAY.

Pass multiple strings

/* it is eample of syntax of php 
to start php code you must start with (< ?php), and end with(? >) and inside the php code block you can not write HTML code, to write html code you have to end PHP script.*/

<?php
$name 
'Ajay';
$profile "PHP DEVELOPER";
$age 30;

echo 
$name,$profile,$age;

?>

// output will be Ajay PHPDEVELOPER 30.

Print Statement print is also a statement i.e used to display the output. in can be used with paraentheses print() or without parentheses.

/* it is eample of syntax of php 
example of print statement*/

<?php
$name 
'Ajay';


print 
$name;

?>

// output will be Ajay.

//// return type

<?php
$name 
'Ajay';
$ret = print $name

echo $ret;

?>

// output will be 1.

PHP Comments

/* it is eample of syntax of php 
example of comments and multi line comments*/
<?php
// this is single line comment in PHP.

/*
this is multi line comments in php.
Comments multi line.
this is example of comments
*/

?>

//not any output.

Thank You