variable

+1 william appiah-dankwah · February 7, 2015
flicking through my php book and i am doing variables bu i am getting an error message on various number word and word space  combination if that make sense to anyone

please reply 

Thank you

Post a Reply

Replies

Oldest  Newest  Rating
0 william appiah-dankwah · February 8, 2015
i can't remember how to insert code on hear but hears what i was writing

<?php

$pan = 1meter;

echo $pan;

?>

it just basic but it won't let me have the 1 as a variable type also space on the bottom code

<?php

$grate = just a;

echo $grate;

?>
0 Calvin Sienatra · February 8, 2015
To fix this, you must add " " symbol because it is a string.
<?
$pan = "1meter";
echo $pan;

<?
$grade = "just a";
echo $grade;

If it is a boolean or a number you don't need to add the " "
<?
$switch = true;

<?
$num = 1;
0 william appiah-dankwah · February 8, 2015
thanks. so how did you insert your code?
0 Calvin Sienatra · February 8, 2015
There's like a insert code button on the bar up there
0 william appiah-dankwah · February 8, 2015
O Yeah i see it. Code i don't know why i never noticed thanks
0 Calvin Sienatra · February 8, 2015
If you have any problems with php, feel free to create a new post on this forum site and have fun studying php. :)
  • 1

PHP

107,236 followers
About

Server-side, HTML embedded scripting language used to create dynamic Web pages.

Links
Moderators