Jump to content

Noob


NurBoNegro`

Recommended Posts

We'll I want to first learn how to code a basic website

 

EDIT:///

 

ok heres some questions I got

<?php
$txt = "Hello World!";
$number = 16;
?>

 

now would that just say on the website "Hello world"

and it would be on line 16.

 

And instead of saying line you say string so string=line?

Link to comment
https://forums.phpfreaks.com/topic/63307-noob/#findComment-315491
Share on other sites

The script does nothing of what you say it'll do. What it'll do is define two variables called txt and number. txt holds a string value of "hello world" and number holds a integer value of 16. It'll do nothing else

 

In order for PHP to display the value of the variables you'll use echo:

<?php
$txt = "Hello World!";
$number = 16;

echo '$txt is: ' . $txt . '<br />';
echo '$number is: ' . $number;

?>

RESULT

$txt is: Hello World
$number is: 16

Link to comment
https://forums.phpfreaks.com/topic/63307-noob/#findComment-315511
Share on other sites

We'll I want to first learn how to code a basic website

 

EDIT:///

 

ok heres some questions I got

<?php
$txt = "Hello World!";
$number = 16;
?>

 

now would that just say on the website "Hello world"

and it would be on line 16.

 

And instead of saying line you say string so string=line?

 

Those are variables. You need to echo them out with echo.

 

Watch the videos at http://www.phpvideotutorials.com you'll find it easy to learn PHP basics.

Link to comment
https://forums.phpfreaks.com/topic/63307-noob/#findComment-315525
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.