Hot Basics of PHP programing

  • Hello 24clan community is now ready, you can drop your request or suggestion in the forum

Ibrahim Buhari

New member
May 22, 2019
16
4
3
Katsina
Credits
136
US$
0
Hello friends in this post we will discuss about a simple php programing syntax after you have set up PHP environment.

It starts with the following syntax
But not in your Html code
<?php
// This is a single line comment

/*
* This is a multiple line comment
*That is more than 2 lines
*/
?>

To out put something in php then use echo code example

<?php
echo "a";
?>

Feel free to drop Ur comment or suggestion or corrections
 

Attachments

Last edited by a moderator:

Ibrahim Buhari

New member
May 22, 2019
16
4
3
Katsina
Credits
136
US$
0
Let's us do some example based on what we have done previously

After you have create a file in your htdocs folder then create your fist page name as index.php

Then let's start the code

<DOCTYPE html>
<html>
<head>
<title> 24clan php tutorial</title>
</head>
<body>

<?php
// Here is our comments which only
// person understand it

echo " Hello world ";


?>

<b> this is html code</b>

</body>
</html>

Make sure you saved it as index.php
Then run your project the out put is

Hello world
This is html code
 

Ibrahim Buhari

New member
May 22, 2019
16
4
3
Katsina
Credits
136
US$
0
PHP Data Types

Php
programing language also has many data type as every programing language has so friends today we will see how to out put and stores variable in PhP.
One thing I will like for you to know is that variable simply means storage of something in something.
Example in mathematics
a=3
3 is stored in a

So in php programing we assign number variable as:-

<?php
$a=5;
echo $a;

//The out put will be if you run
// 5
?>

Note:
If you want to assign a variable php use $ dollar symbol

Practice makes perfect do it on your pc
 

Ibrahim Buhari

New member
May 22, 2019
16
4
3
Katsina
Credits
136
US$
0
PHP Data Types

Php
programing language also has many data type as every programing language has so friends today we will see how to out put and stores variable in PhP.
One thing I will like for you to know is that variable simply means storage of something in something.
Example in mathematics
a=3
3 is stored in a

So in php programing we assign number variable as:-

<?php
$a=5;
echo $a;

//The out put will be if you run
// 5
?>

Note:
If you want to assign a variable php use $ dollar symbol

Practice makes perfect do it on your pc
Please any comments should be done using the tutorial part reply.
 

Dear User!

We found that you are blocking the display of ads on our site.

Please add it to the exception list or disable AdBlock.

Our materials are provided for FREE and the only revenue is advertising.

Thank you for understanding!